mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: add originFrontend to app.conf
This commit is contained in:
@ -59,7 +59,7 @@ func isIpAddress(host string) bool {
|
||||
return ip != nil
|
||||
}
|
||||
|
||||
func getOriginFromHost(host string) (string, string) {
|
||||
func getOriginFromHostInternal(host string) (string, string) {
|
||||
origin := conf.GetConfigString("origin")
|
||||
if origin != "" {
|
||||
return origin, origin
|
||||
@ -82,6 +82,17 @@ func getOriginFromHost(host string) (string, string) {
|
||||
}
|
||||
}
|
||||
|
||||
func getOriginFromHost(host string) (string, string) {
|
||||
originF, originB := getOriginFromHostInternal(host)
|
||||
|
||||
originFrontend := conf.GetConfigString("originFrontend")
|
||||
if originFrontend != "" {
|
||||
originF = originFrontend
|
||||
}
|
||||
|
||||
return originF, originB
|
||||
}
|
||||
|
||||
func GetOidcDiscovery(host string) OidcDiscovery {
|
||||
originFrontend, originBackend := getOriginFromHost(host)
|
||||
|
||||
|
Reference in New Issue
Block a user