Files
cozystack/packages
toribru 00a540eb62 fix(ingress): restore visitor IPs through SSL passthrough
With cloudflareProxy enabled, HTTPS reaches nginx from the
ssl-passthrough proxy on loopback. Without trusting that proxy, the
whitelist sees 127.0.0.1 instead of the visitor address; trusting it
without checking the PROXY-protocol peer would reopen the spoofing
closed by #4444.

Checking the transport peer before the whitelist preserves that
protection, while port 80 needs its direct peer because no
PROXY-protocol address exists there.

Tested with helm-unittest and an isolated ingress-nginx controller:
trusted PROXY peers pass the whitelist with the restored visitor
address, while spoofed headers on HTTP and HTTPS return 403.

Closes: #5327
Assisted-by: LLM
Signed-off-by: toribru <161638395+toribru@users.noreply.github.com>
2026-11-26 01:30:15 +03:00
..