This commit is contained in:
Yang Luo
2023-09-30 09:11:47 +08:00
parent de6cd380eb
commit 620383cf33
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ func CorsFilter(ctx *context.Context) {
originHostname := getHostname(origin)
host := ctx.Request.Host
if strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") || strings.HasPrefix(origin, "http://casdoor-app") {
if strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "https://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") || strings.HasPrefix(origin, "http://casdoor-app") {
setCorsHeaders(ctx, origin)
return
}