Skip to main content

Module forwarded

Module forwarded 

Source
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 Forwarded field name from RFC 7239, Section 4.

Functions§

extract_header_forwarded_for
Extract RFC 7239 Forwarded for= values as an untrusted IP chain.
extract_request_forwarded_for
Extract the untrusted Forwarded for= IP chain from a complete request.
extract_rightmost_forwarded
Extract the rightmost Forwarded for= IP address from a header.