Class ActionDispatch::RemoteIp::GetIp
In: lib/action_dispatch/middleware/remote_ip.rb
Parent: Object

Methods

calculate_ip   ips_from   new   to_s  

Public Class methods

Public Instance methods

Determines originating IP address. REMOTE_ADDR is the standard but will be wrong if the user is behind a proxy. Proxies will set HTTP_CLIENT_IP and/or HTTP_X_FORWARDED_FOR, so we prioritize those. HTTP_X_FORWARDED_FOR may be a comma-delimited list in the case of multiple chained proxies. The last address which is not a known proxy will be the originating IP.

Protected Instance methods

[Validate]