Skip to main content

extract_header_x_envoy_external_address

Function extract_header_x_envoy_external_address 

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

Extract an untrusted client IP asserted by Envoy’s X-Envoy-External-Address.

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, non-IETF field does not authenticate Envoy or the sender, so its result remains raw and untrusted.