@@ -22,11 +22,7 @@ server {
2222 ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
2323
2424 # Security headers for SEO
25- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
26- add_header X-Content-Type-Options "nosniff" always;
27- add_header X-Frame-Options "SAMEORIGIN" always;
28- add_header X-XSS-Protection "1; mode=block" always;
29- add_header Referrer-Policy "strict-origin-when-cross-origin" always;
25+ include /etc/nginx/security_headers.inc;
3026
3127 client_max_body_size 10M ;
3228
@@ -41,28 +37,32 @@ server {
4137 proxy_send_timeout 600s ;
4238
4339 # Cache headers for HTML (no-cache to get fresh content, but browser can revalidate)
44- add_header Cache-Control "public, max-age=3600" always;
40+ add_header Cache-Control "no-cache" always;
41+ include /etc/nginx/security_headers.inc;
4542 }
4643
4744 location /static/ {
4845 alias /opt/infrascan/static/;
4946 # Cache static assets for 1 year
5047 expires 365d ;
51- add_header Cache-Control "public, immutable" always;
48+ add_header Cache-Control "public, max-age=31536000, immutable" always;
49+ include /etc/nginx/security_headers.inc;
5250 }
5351
5452 location = /sitemap.xml {
5553 alias /opt/infrascan/static/sitemap.xml;
5654 # Cache sitemap for 24 hours
5755 add_header Cache-Control "public, max-age=86400" always;
5856 add_header Content-Type "application/xml; charset=utf-8" always;
57+ include /etc/nginx/security_headers.inc;
5958 }
6059
6160 location = /robots.txt {
6261 alias /opt/infrascan/static/robots.txt;
6362 # Cache robots.txt for 24 hours
6463 add_header Cache-Control "public, max-age=86400" always;
6564 add_header Content-Type "text/plain; charset=utf-8" always;
65+ include /etc/nginx/security_headers.inc;
6666 }
6767
6868 # Error pages
0 commit comments