Unset TRUSTED_PROXIES trusts RFC 1918, empty trusts none (closes #129) #136

Merged
clawbot merged 1 commits from issue-129-trusted-proxies-default into next 2026-10-14 14:01:38 +02:00
1 Commits
Author SHA1 Message Date
sneak 0fb647e8be Unset TRUSTED_PROXIES trusts RFC 1918, empty trusts none (closes #129)
check / check (push) Waiting to run
The backend's own TRUSTED_PROXIES now follows the ruling for every app:
unset, it trusts 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, and no
longer loopback; a list replaces that; set and empty, it trusts no
proxy.

viper reads an empty environment variable as unset, so an empty value
got the default. config.New now reads this one setting with
os.LookupEnv first. viper's AllowEmptyEnv would apply to every setting,
so an empty PORT or DEBUG would stop the start instead of counting as
unset, as README.md says it does.

bin/entrypoint.sh still starts the backend with
TRUSTED_PROXIES=127.0.0.1/32.

Model: opus-5-5
2026-10-14 11:48:30 +00:00