sanitize url for konnectd template

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-12-23 09:35:49 +00:00
parent 26c82b5551
commit f48b3f4ef9
+2 -2
View File
@@ -96,8 +96,8 @@ func createConfigsIfNotExist(assets http.FileSystem, ocisURL string) error {
return err
}
// TODO replace placeholder {{OCIS_URL}} with https://localhost:9200 / correct host
conf = []byte(strings.ReplaceAll(string(conf), "{{OCIS_URL}}", ocisURL))
// replace placeholder {{OCIS_URL}} with https://localhost:9200 / correct host
conf = []byte(strings.ReplaceAll(string(conf), "{{OCIS_URL}}", strings.TrimRight(ocisURL, "/")))
err = ioutil.WriteFile("./config/identifier-registration.yaml", conf, 0600)
if err != nil {