# headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header X-Content-Type-Options "nosniff" always; add_header X-UA-Compatible "IE=Edge" always; add_header Cache-Control "no-transform" always; # . files location ~ /\.(?!well-known).* { deny all; } # css/js location ~* \.(css|js)$ { expires {{ data.expires.css_js }}; access_log off; } # {{ data.expires.css_js !== '' && data.expires.css_js === data.expires.media ? 'css/js, ' : '' }}media location ~* \.({{ data.expires.css_js !== '' && data.expires.css_js === data.expires.media ? 'css|js|' : '' }}jpe?g|gif|png|heic|ico|cur|mp4|mov|ogg|ogv|webm|htc)$ { expires {{ data.expires.media }}; access_log off; } # svg location ~* \.svg$ { add_header Access-Control-Allow-Origin "*"; expires {{ data.expires.svg }}; access_log off; } # {{ data.expires.svg !== '' && data.expires.svg === data.expires.font ? 'svg, ' : '' }}fonts location ~* \.({{ data.expires.svg !== '' && data.expires.svg === data.expires.font ? 'svg|' : '' }}ttf|ttc|otf|eot|woff|woff2)$ { add_header Access-Control-Allow-Origin "*"; expires {{ data.expires.font }}; access_log off; } # gzip gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;