Skip to main content

is_trusted_proxy

Function is_trusted_proxy 

Source
pub fn is_trusted_proxy(connecting: &str, trusted_proxies: &[String]) -> bool
Expand description

_proxy_matches / _is_trusted_proxy.

The connecting text must parse as an address; a bare entry then compares as text (the unix token never matches a real peer, and an IPv4-mapped spelling is a different text from its IPv4 form), a CIDR entry contains the address within its own family.