Unset TRUSTED_PROXIES trusts the RFC 1918 ranges (closes #119)
check / check (push) Successful in 2m48s

With TRUSTED_PROXIES unset, bin/entrypoint.sh gives nginx one
set_real_ip_from line for each of 10.0.0.0/8, 172.16.0.0/12 and
192.168.0.0/16, as sneak ruled on 2026-09-22 for every app. A list
replaces them, and set and empty trusts no proxy; each entry is checked
as before. The backend inside the container still trusts only
127.0.0.1/32. Both READMEs, nginx.conf and the comment in
script/frontend-viewport-test say the new default.

Model: opus-5-5
This commit is contained in:
2026-10-14 08:48:15 +00:00
parent b1eefe0c29
commit 47b5ccd682
6 changed files with 43 additions and 29 deletions
+3 -2
View File
@@ -64,8 +64,9 @@ main() {
# nginx.conf is a template: the image renders it over its own
# default.conf, with the same port and limit bin/entrypoint.sh uses.
# The empty file it includes trusts no proxy, as bin/entrypoint.sh
# writes it when TRUSTED_PROXIES is unset. nginx.conf also includes
# the security headers, so the page runs under the shipped policy.
# writes it when TRUSTED_PROXIES is set and empty. nginx.conf also
# includes the security headers, so the page runs under the shipped
# policy.
docker run -d --rm --name "$SERVER" \
--network "$NETWORK" --network-alias netwatch \
-e PORT=8080 -e NGINX_ENVSUBST_FILTER='^PORT$' \