aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb4
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