Expand description
Deciding which address a request really came from.
X-Forwarded-For is a claim, not a fact: anyone who can reach the port can
set it. It is trustworthy only on the hop written by a proxy we control, so
the header is consulted only when the immediate peer is a configured
trusted proxy, and ignored entirely otherwise. Without that check a per-IP
throttle keyed on the header is bypassed by changing one header value.
Structs§
- Cidr
- An address range trusted to speak for its clients.
- Trusted
Proxies - The proxies whose
X-Forwarded-Forwe believe.
Enums§
- Trusted
Proxy Error - Why a trusted-proxy configuration was rejected at startup.
Functions§
- forwarded_
for - Joins every
X-Forwarded-Forvalue on the request, in order. - throttle_
key - Collapses an address to the identity a throttle should count.