server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; # CSP — allows Anthropic API calls and Google Fonts add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob:; connect-src 'self' https://api.anthropic.com; worker-src blob:;" always; gzip on; gzip_types text/html text/css application/javascript; gzip_min_length 1024; location /health { access_log off; return 200 "ok\n"; add_header Content-Type text/plain; } location / { try_files $uri $uri/ /index.html; expires -1; add_header Cache-Control "no-store, no-cache, must-revalidate"; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|woff2)$ { expires 1y; add_header Cache-Control "public, immutable"; } }