server { listen 8080; server_name _; root /usr/share/nginx/html; # k8s readiness/liveness probe location = /health { access_log off; default_type text/plain; return 200 "ok\n"; } # vite puts content hashes in asset names, so they never change location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } location / { add_header Cache-Control "no-cache"; try_files $uri $uri/ /index.html; } }