server { listen 8080; root /usr/share/nginx/html; index index.html; # SPA fallback: all unmatched paths → app shell location / { try_files $uri $uri/ /index.html; } # Long-lived cache for fingerprinted assets location ~* \.(js|css|woff2?|ttf|eot|svg|png|jpg|jpeg|gif|ico)$ { expires 1y; add_header Cache-Control "public, immutable"; } # Never cache the entry point location = /index.html { add_header Cache-Control "no-store, no-cache, must-revalidate"; } }