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
+8
View File
@@ -138,6 +138,14 @@ server {
proxy_send_timeout 600;
proxy_read_timeout 600;
add_header 'Access-Control-Allow-Origin' 'http://localhost:3000' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS, PATCH' always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Content-Type,X-CSRF-Token,X-Requested-With' always;
if ($request_method = OPTIONS) {
return 204;
}
# Handle preflight requests
if ($request_method = OPTIONS) {
return 204;