Skip to main content

resolve_client_ip

Function resolve_client_ip 

Source
pub fn resolve_client_ip(
    context: &AuthContext,
    request: &Request<Body>,
) -> Option<String>
Expand description

Resolve the trusted client IP for a request using advanced.ip_address configuration. Shared by rate limiting and request metadata so the two never disagree about the same request. Returns None when no trusted IP can be resolved instead of trusting raw forwarding headers.

Exposed so plugin crates that create sessions outside the core auth flows (e.g. passkey login) persist the same validated client IP rather than trusting raw forwarding headers.