pub fn is_trusted_proxy(peer_ip: &str, trusted_proxy_cidrs: &str) -> boolExpand description
Checks whether a direct peer address belongs to one of the configured CIDRs.
§Parameters
peer_ip: Input consumed bycrate::http::is_trusted_proxy.trusted_proxy_cidrs: Input consumed bycrate::http::is_trusted_proxy.
§Returns
Returns true when the condition checked by crate::http::is_trusted_proxy holds and false otherwise.
§Performance
Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::http::is_trusted_proxy.
§Examples
ⓘ
let _result = pharos_runtime_core::http::is_trusted_proxy("127.0.0.1", "127.0.0.1/32");§Related
crate::httpfor adjacent helpers that share the same runtime surface.