fix: cors allow all headers

This commit is contained in:
JustSong 2023-06-20 22:04:01 +08:00
parent 868f0474a9
commit 634099e592

View File

@ -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)
} }