pub fn extract_real_ip_from_headers(
headers: &str,
peer_info: Option<&str>,
trusted_proxy: bool,
) -> Option<String>Expand description
Selects the real client IP from trusted forwarded headers or peer data.
§Parameters
headers: Input consumed bycrate::http::extract_real_ip_from_headers.peer_info: Input consumed bycrate::http::extract_real_ip_from_headers.trusted_proxy: Input consumed bycrate::http::extract_real_ip_from_headers.
§Returns
Returns Some when crate::http::extract_real_ip_from_headers can produce a value and None otherwise.
§Performance
Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::http::extract_real_ip_from_headers.
§Examples
ⓘ
let _result = pharos_runtime_core::http::extract_real_ip_from_headers("host: example", todo!(), todo!());§Related
crate::httpfor adjacent helpers that share the same runtime surface.