server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; # Hash-versionierte Assets — langer Cache OK location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; try_files $uri =404; } # SPA-Fallback: unbekannte Pfade → index.html (React-Routing-kompatibel) location / { add_header Cache-Control "no-cache, no-store, must-revalidate"; try_files $uri /index.html; } add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; }