Make sure the configured frontend url always has a / at the end

This commit is contained in:
kolaente 2021-05-28 08:39:27 +02:00
parent e23014dbe4
commit afd6bde74d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -378,6 +378,10 @@ 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())
} }