chore: add x-requested-with header in CORS setting
This commit is contained in:
parent
a43b1e2add
commit
6855d0dc39
@ -10,6 +10,6 @@ func CORS() gin.HandlerFunc {
|
||||
config.AllowAllOrigins = true
|
||||
config.AllowCredentials = true
|
||||
config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}
|
||||
config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection"}
|
||||
config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection", "x-requested-with"}
|
||||
return cors.New(config)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user