mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-10 01:56:49 +08:00
Make sure newStaticBaseUrl is not empty
This commit is contained in:
10
conf/conf.go
10
conf/conf.go
@ -28,7 +28,15 @@ func GetConfigString(key string) string {
|
|||||||
if value, ok := os.LookupEnv(key); ok {
|
if value, ok := os.LookupEnv(key); ok {
|
||||||
return value
|
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) {
|
func GetConfigBool(key string) (bool, error) {
|
||||||
|
Reference in New Issue
Block a user