Skip to content

Commit bbabb2b

Browse files
Merge pull request #14 from PDOK/jd/simulate-k8s-validation
Allow localhost without https
2 parents de7b821 + d2757c0 commit bbabb2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config/samples/v1_ownerinfo.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ spec:
99
metadataUrls:
1010
csw:
1111
hrefTemplate: "https://www.nationaalgeoregister.nl/geonetwork/srv/dut/csw?service=CSW&version=2.0.2&request=GetRecordById&outputschema=http://www.isotc211.org/2005/gmd&elementsetname=full&id={{identifier}}"
12-
type:
12+
type: alternate
1313
opensearch:
1414
hrefTemplate: "https://www.nationaalgeoregister.nl/geonetwork/opensearch/dut/{{identifier}}/OpenSearchDescription.xml"
15-
type:
15+
type: alternate
1616
html:
1717
hrefTemplate: "https://www.nationaalgeoregister.nl/geonetwork/srv/dut/catalog.search#/metadata/{{identifier}}"
18-
type:
18+
type: alternate
1919
namespaceTemplate: "http://{{prefix}}.geonovum.nl"
2020
atom:
2121
author: # author/owner van de dataset

pkg/validation/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func ValidateBaseURL(baseURL string) error {
1414
return fmt.Errorf("invalid BaseURL: %w", err)
1515
}
1616

17-
if parsed.Scheme != "https" {
17+
if parsed.Scheme != "https" && parsed.Hostname() != "localhost" {
1818
return errors.New("invalid BaseURL: must use https scheme")
1919
}
2020

0 commit comments

Comments
 (0)