Skip to content

Commit

Permalink
响应支持*
Browse files Browse the repository at this point in the history
  • Loading branch information
lvyahui8 committed Oct 24, 2024
1 parent e5ce059 commit fba67fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func Cors() gin.HandlerFunc {
c.Header("Access-Control-Allow-Origin", "*")
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
c.Header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
c.Header("Access-Control-Expose-Headers", "*")
c.Header("Access-Control-Expose-Headers",
"Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,X-Ellyn-Gid, Cache-Control, Content-Language, Content-Type")
c.Header("Access-Control-Allow-Credentials", "true")
}
if method == "OPTIONS" {
Expand Down

0 comments on commit fba67fc

Please sign in to comment.