fix: Duplicated CORS headers

This commit is contained in:
LukeGus
2025-11-01 16:40:08 -05:00
parent dd19b2b990
commit d0385bd2c9
6 changed files with 25 additions and 51 deletions

View File

@@ -26,16 +26,10 @@ http {
add_header X-Content-Type-Options nosniff always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS, PATCH" always;
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" always;
add_header Access-Control-Allow-Credentials "true" always;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, immutable";
add_header Access-Control-Allow-Origin $http_origin always;
try_files $uri =404;
}