Trust reverse proxies at private addresses by default (closes #198) #205

Merged
clawbot merged 1 commits from issue-198-trusted-proxy-default into next 2026-10-27 19:18:35 +01:00
1 Commits
Author SHA1 Message Date
sneak 355ea53b32 Trust reverse proxies at private addresses by default (closes #198)
check / check (push) Waiting to run
With TRUSTED_PROXIES unset, the server now trusts reverse proxies in the
private ranges of RFC 1918. A proxy such as traefik on a Docker network is
then believed. /ip/, the home page's curl card and the request log give the
client's address from X-Forwarded-For instead of the proxy's address.

A list in TRUSTED_PROXIES replaces the default. TRUSTED_PROXIES set but
empty trusts no proxy, so the config package reads it with os.LookupEnv.
A direct client at a public address still cannot choose its address with
a forged header.

Model: opus-5-5
2026-10-27 18:07:20 +00:00