# NK Admin: a single-page web app. Unknown paths load index.html so deep links work. # Flutter's main.dart.js and flutter_bootstrap.js have no content hash, so code is always # revalidated (cheap: ETag) and only images and fonts are cached. # nginx drops server-level add_header lines inside a location that sets its own, so the # security headers are repeated in each location. server { listen 80; root /usr/share/nginx/html; location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-cache" always; add_header X-Frame-Options DENY always; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy same-origin always; } location ~* \.(png|jpg|svg|ico|ttf|otf|woff2?)$ { expires 7d; add_header X-Content-Type-Options nosniff always; } }