server { listen 8080; server_name _; server_tokens off; root /usr/share/nginx/html; index index.html; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "DENY" always; add_header Referrer-Policy "no-referrer" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; add_header Content-Security-Policy "default-src 'self'; connect-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'; font-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'" always; location /api/ { proxy_pass http://backend:8080; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 3s; proxy_read_timeout 15s; proxy_send_timeout 15s; client_max_body_size 64k; } location /integrations/ { proxy_pass http://backend:8080; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 3s; proxy_read_timeout 30s; proxy_send_timeout 15s; client_max_body_size 64k; } location = /healthz { proxy_pass http://backend:8080/healthz; proxy_set_header Host $host; proxy_connect_timeout 2s; proxy_read_timeout 3s; } location / { try_files $uri $uri/ /index.html; } location ~* \.(?:js|css|svg|png|woff2)$ { expires 1y; add_header Cache-Control "public, immutable"; try_files $uri =404; } }