server { listen 7860; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; # Standard Security and Proxy Headers add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; # Required for many modern web APIs (SharedArrayBuffer, etc) used by Flutter add_header Cross-Origin-Embedder-Policy "require-corp"; add_header Cross-Origin-Opener-Policy "same-origin"; } # Optimization for static assets location ~* \.(?:js|css|json|wasm|wav|mp3)$ { root /usr/share/nginx/html; expires 1y; add_header Cache-Control "public"; access_log off; } }