From df45675df33ef556f6e096da32758323bead5027 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 28 May 2021 08:46:31 +0200 Subject: [PATCH] Rearrange setting frontend url in config --- pkg/config/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 64a048e9..d7df8e96 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -361,6 +361,10 @@ func InitConfig() { RateLimitStore.Set(KeyvalueType.GetString()) } + if ServiceFrontendurl.GetString() != "" && !strings.HasSuffix(ServiceFrontendurl.GetString(), "/") { + ServiceFrontendurl.Set(ServiceFrontendurl.GetString() + "/") + } + if AuthOpenIDRedirectURL.GetString() == "" { AuthOpenIDRedirectURL.Set(ServiceFrontendurl.GetString() + "auth/openid/") } @@ -378,10 +382,6 @@ func InitConfig() { MetricsEnabled.Set(true) } - if ServiceFrontendurl.GetString() != "" && !strings.HasSuffix(ServiceFrontendurl.GetString(), "/") { - ServiceFrontendurl.Set(ServiceFrontendurl.GetString() + "/") - } - log.Printf("Using config file: %s", viper.ConfigFileUsed()) }