server { listen 80; root /usr/share/nginx/html; index index.html; # SPA-Routing: alle Pfade auf index.html location / { try_files $uri $uri/ /index.html; } # Caching fuer Assets location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; } # Kein Caching fuer index.html location = /index.html { add_header Cache-Control "no-cache"; } }