server { listen 80; listen [::]:80; server_name _; server_tokens off; root /usr/share/nginx/html; index index.html; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "no-referrer" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; add_header Content-Security-Policy "default-src 'self'; img-src 'self' blob: data:; style-src 'self' 'unsafe-inline'; script-src 'self'; connect-src 'self'; font-src 'self' data:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'; worker-src 'none'" always; # Runtime-managed overlays must be revalidated so replacing a logo or # overlays.json takes effect without rebuilding the application image. location ^~ /overlays/ { expires -1; try_files $uri =404; } # Vite-generated assets are content-hashed and can be cached safely. location ~* \.(?:css|js|mjs|png|jpe?g|webp|woff2?)$ { expires 7d; try_files $uri =404; } # Keep the application shell fresh and support SPA navigation. location / { expires -1; try_files $uri $uri/ /index.html; } }