mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: fix 403 error in CorsFilter
This commit is contained in:
@ -171,6 +171,14 @@ func getHostname(s string) string {
|
||||
return res
|
||||
}
|
||||
|
||||
func removePort(s string) string {
|
||||
ipStr, _, err := net.SplitHostPort(s)
|
||||
if err != nil {
|
||||
ipStr = s
|
||||
}
|
||||
return ipStr
|
||||
}
|
||||
|
||||
func isHostIntranet(s string) bool {
|
||||
ipStr, _, err := net.SplitHostPort(s)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user