Skip to main content

request_real_ip

Function request_real_ip 

Source
pub fn request_real_ip(
    headers: &str,
    peer_info: Option<&str>,
    trusted_proxy_cidrs: Option<&str>,
) -> Option<String>
Expand description

Returns a client address selected from the request’s trusted proxy context.

§Parameters

§Returns

Returns Some when crate::http::request_real_ip can produce a value and None otherwise.

§Examples

ⓘ
let _result = pharos_runtime_core::http::request_real_ip("host: example", todo!(), "127.0.0.1/32");
  • crate::http for adjacent helpers that share the same runtime surface.