nginx.conf 501 B

12345678910111213141516171819202122
  1. server {
  2. listen 80;
  3. server_name _;
  4. root /usr/share/nginx/html;
  5. index index.html;
  6. # SPA fallback — serve index.html for all routes
  7. location / {
  8. try_files $uri $uri/ /index.html;
  9. }
  10. # Cache static assets
  11. location ~* \.(js|css|woff2?|png|jpg|svg|ico)$ {
  12. expires 1y;
  13. add_header Cache-Control "public, immutable";
  14. }
  15. # No cache for the HTML entry point
  16. location = /index.html {
  17. add_header Cache-Control "no-cache";
  18. }
  19. }