Skip to content

Commit

Permalink
cors 包的 isOriginAllowed 方法校验感觉去掉拼接的前缀【.】
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwu123 committed Nov 3, 2023
1 parent 6ecc5e7 commit 3ed5cbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest/internal/cors/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func isOriginAllowed(allows []string, origin string) bool {
return true
}

if strings.HasSuffix(origin, "."+allow) {
if strings.HasSuffix(origin, allow) {
return true
}
}
Expand Down

0 comments on commit 3ed5cbf

Please sign in to comment.