server { listen 80; root /usr/share/nginx/html; index index.html; # The OpenBao address is chosen at runtime, so connect-src cannot be narrowed to one origin. # Tighten it if you only ever talk to a single OpenBao. add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' http: https:; frame-ancestors 'none'; base-uri 'none'; form-action 'self'" always; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy no-referrer always; add_header X-Frame-Options DENY always; location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; add_header X-Content-Type-Options nosniff always; } location / { try_files $uri /index.html; } }