Make sure newStaticBaseUrl is not empty

This commit is contained in:
Gucheng Wang 2022-08-29 21:27:47 +08:00
parent c62983d734
commit 2394c8e2b4

View File

@ -28,7 +28,15 @@ func GetConfigString(key string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return beego.AppConfig.String(key)
res := beego.AppConfig.String(key)
if res == "" {
if key == "staticBaseUrl" {
res = "https://cdn.casbin.org"
}
}
return res
}
func GetConfigBool(key string) (bool, error) {