pub fn client_address(
headers: &HeaderMap,
peer: Option<IpAddr>,
) -> Option<IpAddr>Expand description
The client address of a request: the peer, or – when the peer is a
reverse proxy on an internal address – the last X-Forwarded-For entry,
the one that proxy added (a client can only prepend to the header). In
tests without a peer address, the header alone.