server { listen 5173; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml; # Hashed bundle assets are immutable; index.html and config.js are not. location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } location = /config.js { add_header Cache-Control "no-store"; } # Single-page app: every unknown path renders index.html. location / { add_header Cache-Control "no-cache"; try_files $uri $uri/ /index.html; } }