modified: main_dc/yalarba/api_es/internal/router/setMiddleware.go

set new corse for api_es
This commit is contained in:
2025-11-15 04:31:12 +05:00
parent a22085ff08
commit 2ac1c1574b
@@ -28,7 +28,7 @@ func setupMiddlewares(r *chi.Mux) {
// Поддержка CORS // Поддержка CORS
r.Use(cors.Handler(cors.Options{ r.Use(cors.Handler(cors.Options{
AllowedOrigins: []string{"https://*", "http://*"}, AllowedOrigins: []string{"https://easysite102.ru", "http://localhost:3000"},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"}, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"}, AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
ExposedHeaders: []string{"Link"}, ExposedHeaders: []string{"Link"},