dounble-headers-fix2
All checks were successful
Deploy on push / deploy (push) Successful in 5s

This commit is contained in:
Untone 2025-05-29 18:21:54 +03:00
parent 47b551068a
commit bdc9854037

View File

@ -57,14 +57,18 @@ server {
{{ $proxy_settings }} {{ $proxy_settings }}
{{ $gzip_settings }} {{ $gzip_settings }}
# Add CORS headers for all requests # Add CORS headers for non-OPTIONS requests
add_header 'Access-Control-Allow-Origin' $allow_origin always; add_header 'Access-Control-Allow-Origin' $allow_origin;
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS' always; add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization' always; add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Credentials' 'true';
# Handle CORS preflight requests # Handle CORS preflight requests
if ($request_method = 'OPTIONS') { if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' $allow_origin always;
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Max-Age' 1728000; add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8'; add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0; add_header 'Content-Length' 0;