fix: cors allow all headers
This commit is contained in:
parent
868f0474a9
commit
634099e592
@ -10,6 +10,6 @@ func CORS() gin.HandlerFunc {
|
|||||||
config.AllowAllOrigins = true
|
config.AllowAllOrigins = true
|
||||||
config.AllowCredentials = true
|
config.AllowCredentials = true
|
||||||
config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}
|
config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}
|
||||||
config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection", "x-requested-with"}
|
config.AllowHeaders = []string{"*"}
|
||||||
return cors.New(config)
|
return cors.New(config)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user