# Rendered by the nginx-unprivileged entrypoint: envsubst expands ${API_UPSTREAM} # (and only names that exist in the environment — nginx's own $uri/$host/etc. # are left alone) into /etc/nginx/conf.d/default.conf at container start. server { # 8080, not 80: unprivileged nginx runs as uid 101 and cannot bind <1024. listen 8080; listen [::]:8080; server_name _; root /usr/share/nginx/html; index index.html; # The bundle is already gzipped over the wire by this; Brotli would need a # module the stock image does not carry, so gzip it is. gzip on; gzip_vary on; gzip_min_length 1024; gzip_proxied any; gzip_types text/plain text/css application/javascript application/json image/svg+xml application/manifest+json; server_tokens off; # nginx does NOT merge add_header across levels: if a location block adds # even one add_header of its own, every add_header set here at server # level is discarded for responses from that location — not appended to. # /assets/, /fonts/ and = /index.html below each set their own # Cache-Control, so the four security headers are repeated verbatim # inside each of those blocks. Add a header here, and it must be added # there too (or it silently never reaches those responses). add_header X-Content-Type-Options nosniff always; add_header X-Frame-Options DENY always; add_header Referrer-Policy no-referrer always; # Derived from the actual production build (frontend/dist): no inline #