From 293443cc897fab2b3edd8890af278ff03adb9f8d Mon Sep 17 00:00:00 2001 From: valitovgaziz Date: Wed, 19 Nov 2025 06:29:58 +0500 Subject: [PATCH] modified: main_dc/nginx/nginx-ssl.conf add to nginx ssl configs perflite option header and cors --- main_dc/nginx/nginx-ssl.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/main_dc/nginx/nginx-ssl.conf b/main_dc/nginx/nginx-ssl.conf index 161f26f..e165855 100644 --- a/main_dc/nginx/nginx-ssl.conf +++ b/main_dc/nginx/nginx-ssl.conf @@ -168,6 +168,16 @@ server { proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; + + if ($request_method = OPTIONS ) { + add_header 'Access-Control-Allow-Origin' "$http_origin"; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE'; + add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Length' 0; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + return 204; + } } location /uploads/ { @@ -175,6 +185,8 @@ server { expires 1y; add_header Cache-Control "public, immutable"; } + + } server { @@ -204,6 +216,16 @@ server { proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; + + if ($request_method = OPTIONS ) { + add_header 'Access-Control-Allow-Origin' "$http_origin"; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE'; + add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Length' 0; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + return 204; + } } location /uploads/ {