server { listen 8080 default_server; server_name _; root /usr/share/nginx/html; index index.html; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "DENY" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; gzip on; gzip_types text/css application/javascript text/javascript application/wasm image/svg+xml; gzip_min_length 512; # fingerprint-hashed Hugo assets (css/js) and the engine bundle: immutable location /css/ { expires 1y; add_header Cache-Control "public, immutable"; } location /js/ { expires 1y; add_header Cache-Control "public, immutable"; } location /gpu/ { expires 1y; add_header Cache-Control "public, immutable"; } # static fonts/favicons location /fonts/ { expires 1y; add_header Cache-Control "public, immutable"; } # everything else: plain static — real files, 404 is legitimate (no SPA fallback) location / { try_files $uri $uri/ =404; expires -1; add_header Cache-Control "no-cache"; } }