Rearrange setting frontend url in config

This commit is contained in:
kolaente 2021-05-28 08:46:31 +02:00
parent afd6bde74d
commit df45675df3
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 4 deletions

View File

@ -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())
}