update nginx config

- sort headers
 - use 'always' condition on headers
 - serve static map and bcmap files
This commit is contained in:
hoellen 2019-09-13 18:40:15 +02:00
parent be4eff0553
commit 075f3659f6

View File

@ -4,14 +4,13 @@ server {
fastcgi_buffers 64 4K; fastcgi_buffers 64 4K;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header X-Content-Type-Options nosniff; add_header Referrer-Policy "no-referrer" always;
add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff" always;
add_header X-Robots-Tag none; add_header X-Download-Options "noopen" always;
add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Permitted-Cross-Domain-Policies none; add_header X-Robots-Tag "none" always;
add_header Referrer-Policy no-referrer; add_header X-XSS-Protection "1; mode=block" always;
location = /robots.txt { location = /robots.txt {
@ -63,20 +62,20 @@ server {
index index.php; index index.php;
} }
location ~ \.(?:css|js|woff2?|svg|gif)$ { location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=7200"; add_header Cache-Control "public, max-age=7200";
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header X-Content-Type-Options nosniff; add_header Referrer-Policy "no-referrer" always;
add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff" always;
add_header X-Robots-Tag none; add_header X-Download-Options "noopen" always;
add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Permitted-Cross-Domain-Policies none; add_header X-Robots-Tag "none" always;
add_header Referrer-Policy no-referrer; add_header X-XSS-Protection "1; mode=block" always;
access_log off; access_log off;
} }
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ { location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
access_log off; access_log off;
} }