rproxy: remove every X-Forwarded- header from an untrusted peer (closes #325) #330

Merged
clawbot merged 1 commits from issue-325-strip-x-forwarded into next 2026-11-11 07:50:51 +01:00
1 Commits
Author SHA1 Message Date
clawbot efe3b60ec9 rproxy: remove every X-Forwarded- header from an untrusted peer (closes #325)
check / check (push) Waiting to run
For a peer outside SWRP_TRUSTED_PROXIES, rproxy removed a fixed list of
traefik's forwarded headers, so names such as X-Forwarded-Ssl and
X-Forwarded-Scheme reached the app as the client sent them. An app that
reads them could take a plain request for a secure one. Now every header
whose name starts with X-Forwarded- is removed before rproxy sets its
three, and X-Real-IP as before. A trusted peer's headers pass on
unchanged.

Model: opus-5-5
2026-11-11 05:49:29 +00:00