Skip to main content

extract_header_x_real_ip

Function extract_header_x_real_ip 

Source
pub fn extract_header_x_real_ip(
    headers: &HeaderMap,
) -> Result<Option<IpAddr>, Error>
Expand description

Extract the raw, untrusted IP asserted by X-Real-IP.

This reads only the HeaderMap. A missing field returns None; duplicate, non-text, empty, or non-IP values return an error without including the value. Surrounding whitespace is ignored. This de facto field is not an IETF standard and does not authenticate the sender.