Skip to main content

extract_remote_ip

Function extract_remote_ip 

Source
pub fn extract_remote_ip<B>(req: &Request<B>) -> Option<String>
Expand description

Extract remote IP address from request headers

Looks for the X-Forwarded-For or X-Real-IP headers to determine the original client IP address.

§Arguments

  • req - The HTTP request

§Returns

The remote IP address if found, None otherwise