Skip to content

Commit

Permalink
修复跨域
Browse files Browse the repository at this point in the history
  • Loading branch information
bydmm committed Feb 24, 2020
1 parent ff95b12 commit 6d239df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Cors() gin.HandlerFunc {
if regexp.MustCompile(`^http://127\.0\.0\.1:\d+$`).MatchString(origin) {
return true
}
if regexp.MustCompile(`^http://localhost\.0\.0\.1:\d+$`).MatchString(origin) {
if regexp.MustCompile(`^http://localhost:\d+$`).MatchString(origin) {
return true
}
return false
Expand Down

0 comments on commit 6d239df

Please sign in to comment.