Rearrange setting frontend url in config
This commit is contained in:
parent
afd6bde74d
commit
df45675df3
1 changed files with 4 additions and 4 deletions
|
@ -361,6 +361,10 @@ func InitConfig() {
|
||||||
RateLimitStore.Set(KeyvalueType.GetString())
|
RateLimitStore.Set(KeyvalueType.GetString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ServiceFrontendurl.GetString() != "" && !strings.HasSuffix(ServiceFrontendurl.GetString(), "/") {
|
||||||
|
ServiceFrontendurl.Set(ServiceFrontendurl.GetString() + "/")
|
||||||
|
}
|
||||||
|
|
||||||
if AuthOpenIDRedirectURL.GetString() == "" {
|
if AuthOpenIDRedirectURL.GetString() == "" {
|
||||||
AuthOpenIDRedirectURL.Set(ServiceFrontendurl.GetString() + "auth/openid/")
|
AuthOpenIDRedirectURL.Set(ServiceFrontendurl.GetString() + "auth/openid/")
|
||||||
}
|
}
|
||||||
|
@ -378,10 +382,6 @@ func InitConfig() {
|
||||||
MetricsEnabled.Set(true)
|
MetricsEnabled.Set(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ServiceFrontendurl.GetString() != "" && !strings.HasSuffix(ServiceFrontendurl.GetString(), "/") {
|
|
||||||
ServiceFrontendurl.Set(ServiceFrontendurl.GetString() + "/")
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("Using config file: %s", viper.ConfigFileUsed())
|
log.Printf("Using config file: %s", viper.ConfigFileUsed())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue