12533: Use @remote_ip to take into account the reverse proxy
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 6 Nov 2017 20:13:57 +0000 (17:13 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 6 Nov 2017 20:13:57 +0000 (17:13 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/app/controllers/application_controller.rb

index 3c786eaa19d149adeb919c369cbd66cf670286cb..9826cf2f906f5a7ecd532b4522d2940f41ca5457 100644 (file)
@@ -388,7 +388,7 @@ class ApplicationController < ActionController::Base
   def append_info_to_payload(payload)
     super
     payload[:request_id] = response.headers['X-Request-Id']
-    payload[:client_ipaddr] = request.remote_ip
+    payload[:client_ipaddr] = @remote_ip
     payload[:client_auth] = current_api_client_authorization.andand.uuid || nil
   end