Skip to main content

get_client_ip

Function get_client_ip 

Source
pub async fn get_client_ip(
    configuration: &Configuration,
) -> Result<String, Error<GetClientIpError>>
Expand description

The address of the client making the request, as token IP allowlists see it: forwarding headers are believed only from the proxies in TRUSTED_PROXIES, or, when it is unset, from loopback and the private ranges, never from Cloudflare. Behind a proxy that is not trusted, this is the proxy’s address. Empty when the server cannot tell.