feat: CORS X-XSRF-TOKEN
Some checks failed
Build and Deploy Go App / build (push) Has been cancelled
Build and Deploy Go App / deploy (push) Has been cancelled

This commit is contained in:
nihonium 2025-12-04 09:03:51 +03:00
parent 3be58457aa
commit 2f4f8164df
Signed by: nihonium
GPG key ID: 0251623741027CFC

View file

@ -66,7 +66,7 @@ func main() {
// AllowOrigins: []string{AppConfig.ServiceAddress}, // AllowOrigins: []string{AppConfig.ServiceAddress},
AllowOrigins: []string{"*"}, AllowOrigins: []string{"*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"}, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"},
AllowHeaders: []string{"Origin", "Content-Type", "Accept"}, AllowHeaders: []string{"Origin", "Content-Type", "Accept", "X-XSRF-TOKEN"},
ExposeHeaders: []string{"Content-Length"}, ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true, AllowCredentials: true,
MaxAge: 12 * time.Hour, MaxAge: 12 * time.Hour,