diff options
author | Andre Arko <andre@arko.net> | 2011-11-16 12:49:15 -1000 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2011-11-16 12:54:18 -1000 |
commit | 5621abd5698536f1676306930f6aef105d7ae6dc (patch) | |
tree | 6ba22b30123e7d405e6142120d87e9cbb71b1e18 /actionpack/lib/action_dispatch/http/request.rb | |
parent | f05ccf805a6d2a3ed73ef9928577e8b0ebbb3c49 (diff) | |
download | rails-5621abd5698536f1676306930f6aef105d7ae6dc.tar.gz rails-5621abd5698536f1676306930f6aef105d7ae6dc.tar.bz2 rails-5621abd5698536f1676306930f6aef105d7ae6dc.zip |
:facepalm: Request#remote_ip has to work without the middleware
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 0e8bd0bd6d..4e6feb708e 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -155,9 +155,9 @@ module ActionDispatch @ip ||= super end - # Originating IP address from the RemoteIp middleware. + # Originating IP address, usually set by the RemoteIp middleware. def remote_ip - @remote_ip ||= @env["action_dispatch.remote_ip"] + @remote_ip ||= @env["action_dispatch.remote_ip"] || ip end # Returns the unique request id, which is based off either the X-Request-Id header that can |