Expand description
Strict extraction of untrusted client IP assertions from Forwarded.
extract_header_forwarded_for implements the crate’s deliberately narrow
use of the standardized field: every field element must contain a usable
for= IP address, and the resulting chain remains untrusted. Effective
A feature-gated client_ip::extract_client_ip convenience can select from
this and other fields, but that selection does not establish trust.
The field grammar is defined by RFC 7239, Section 4, the for parameter
by RFC 7239, Section 5.2, node identifiers by RFC 7239, Section 6, and
the trust limitations by RFC 7239, Section 8. This crate implements only
the subset needed to produce a continuous IP chain, not the full RFC object
model.
Constants§
- FORWARDED
- The standardized
Forwardedfield name from RFC 7239, Section 4.
Functions§
- extract_
header_ forwarded_ for - Extract RFC 7239
Forwardedfor=values as an untrusted IP chain. - extract_
request_ forwarded_ for - Extract the untrusted
Forwardedfor=IP chain from a complete request. - extract_
rightmost_ forwarded - Extract the rightmost
Forwardedfor=IP address from a header.