Add Content-Type to AllowHeaders

This commit is contained in:
qowevisa 2024-08-14 15:05:55 +03:00
parent db78c5c6c2
commit 746b4f15e7

View File

@ -34,7 +34,7 @@ func main() {
r.Use(cors.New(cors.Config{ r.Use(cors.New(cors.Config{
AllowOrigins: []string{"*"}, AllowOrigins: []string{"*"},
AllowMethods: []string{"GET", "DELETE", "PUT", "PATCH", "OPTIONS"}, AllowMethods: []string{"GET", "DELETE", "PUT", "PATCH", "OPTIONS"},
AllowHeaders: []string{"Origin"}, AllowHeaders: []string{"Origin", "Content-Type"},
ExposeHeaders: []string{"Content-Length"}, ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true, AllowCredentials: true,
MaxAge: 12 * time.Hour, MaxAge: 12 * time.Hour,