Parcourir la source

fix: cors allow all headers

JustSong il y a 2 ans
Parent
commit
634099e592
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      middleware/cors.go

+ 1 - 1
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", "x-requested-with"}
+	config.AllowHeaders = []string{"*"}
 	return cors.New(config)
 }