Skip to main content

Module client_ip

Module client_ip 

Source
Expand description

Client IP resolution (X-Forwarded-For / X-Real-IP / socket address), shared by every RequestParts construction site and by ip_allowlist’s allowlist check. Resolves the client IP address from request headers/extensions.

Moved down from rust/public/src/servers/http_utils.rs::get_client_ip so every AuthProvider (not just audit logging) can consult the same resolution: micromegas-auth cannot depend on the public crate (it’s the other way around), so this logic has to live here for IpAllowlist::allows to use it. get_client_ip becomes a thin formatting wrapper over [resolve_client_ip].

Functions§

resolve_client_ip
Resolves the client IP address from HTTP headers and extensions.