Commit cab830b7 by JustSong

fix: cors allow all headers

parent 72c15c74
...@@ -10,6 +10,6 @@ func CORS() gin.HandlerFunc { ...@@ -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)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment