Expand description
Trusted-proxy-aware HTTP header adapter. Direct peers come from the connection, never headers.
Functions§
- client_
ip - Resolves the request’s client IP, retaining
Nonewhen connection info is missing. - direct_
peer - Reads the TCP peer populated by
into_make_service_with_connect_info::<SocketAddr>(). UDS or services without connection info returnNone; headers cannot fill this gap. - real_
ip_ from_ headers - Resolves a client IP using raw trusted CIDRs/IPs and an explicit direct peer.
- real_
ip_ from_ trusted_ headers - Resolves a client IP using parsed trusted proxies. Invalid forwarded values fall back to peer.