server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml; location / { try_files $uri $uri/ /index.html; } # Static unhashed images, audio, and media - never cache to allow instant updates location ~* \.(png|jpg|jpeg|gif|ico|svg|webp|mp3|wav|ogg)$ { add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; expires -1; } # Vite bundled hashed JS/CSS assets location ~* \.(js|css)$ { expires 1y; add_header Cache-Control "public, immutable"; } }