mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
Make sure newStaticBaseUrl is not empty
This commit is contained in:
parent
c62983d734
commit
2394c8e2b4
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user