From f48b3f4ef999adf8d43b39a5d9b54a3b46309394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 23 Dec 2020 09:35:49 +0000 Subject: [PATCH] sanitize url for konnectd template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- konnectd/pkg/service/v0/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/konnectd/pkg/service/v0/service.go b/konnectd/pkg/service/v0/service.go index 44d5c1e60..319879f53 100644 --- a/konnectd/pkg/service/v0/service.go +++ b/konnectd/pkg/service/v0/service.go @@ -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 {