server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; # SPA / static Needle export location / { try_files $uri $uri/ /index.html; } # wasm / glb / long cache for hashed assets (optional) location ~* \.(wasm|glb|png|jpg|jpeg|webp|ico|svg)$ { try_files $uri =404; add_header Cache-Control "public, max-age=31536000, immutable"; } gzip on; gzip_types text/css application/javascript application/json image/svg+xml; }