diff --git a/middleware/cors.go b/middleware/cors.go index 0197ef02..d5a5ed71 100644 --- a/middleware/cors.go +++ b/middleware/cors.go @@ -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) }