This commit is contained in:
harold 2025-04-18 08:21:40 +05:00
parent 00cdc1ac13
commit 323bcf374e

View File

@ -34,9 +34,17 @@ func NewApp(
server.Use(
middleware.CORSWithConfig(
middleware.CORSConfig{
AllowOrigins: []string{"*"}, // Разрешить все домены
AllowMethods: []string{"*"},
AllowHeaders: []string{"*"},
AllowOrigins: []string{
"https://donatehelper.com",
"https://donatehelper.com",
"https://widget.donatehelper.com",
"http://widget.donatehelper.com",
"http://127.0.0.1:8002",
},
AllowHeaders: []string{"Content-Type", "Authorization", "X-Requested-With"},
AllowCredentials: true,
ExposeHeaders: []string{"Content-Length"},
MaxAge: 86400,
},
),
)