pub fn get_client_ip(session: &Session) -> StringExpand description
Gets the client’s IP address.
When trusted proxies are configured, X-Forwarded-For / X-Real-IP are
only honoured if the direct TCP peer is a trusted proxy; otherwise the
peer’s own address is returned. When no trusted proxies are configured the
lookup order is:
X-Forwarded-For(taking the first IP in the list)X-Real-IP- The remote address of the direct TCP connection