mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
feat: allow CORS for 127.0.0.1
This commit is contained in:
@ -57,7 +57,7 @@ func CorsFilter(ctx *context.Context) {
|
||||
originHostname := getHostname(origin)
|
||||
host := ctx.Request.Host
|
||||
|
||||
if strings.HasPrefix(origin, "http://localhost") {
|
||||
if strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") {
|
||||
setCorsHeaders(ctx, origin)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user