modified: main_dc/nginx/nginx-ssl.conf

modified:   main_dc/yalarba/api_es/internal/router/setMiddleware.go
add headers nginx
This commit is contained in:
2025-11-15 04:51:50 +05:00
parent 2ac1c1574b
commit 5446bef3e9
2 changed files with 9 additions and 1 deletions
@@ -30,7 +30,7 @@ func setupMiddlewares(r *chi.Mux) {
r.Use(cors.Handler(cors.Options{
AllowedOrigins: []string{"https://easysite102.ru", "http://localhost:3000"},
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", "X-Requested-With"},
ExposedHeaders: []string{"Link"},
AllowCredentials: true,
MaxAge: 300, // 5 минут