From cd986020bec154f7722de3574ff95783ec20a02c Mon Sep 17 00:00:00 2001 From: nikhlagrwl Date: Tue, 23 Aug 2022 18:48:35 +0530 Subject: [PATCH] get the first ip from x_fowrarded_for --- lib/chitragupta/active_support/instrumentation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chitragupta/active_support/instrumentation.rb b/lib/chitragupta/active_support/instrumentation.rb index 383175c..457b239 100644 --- a/lib/chitragupta/active_support/instrumentation.rb +++ b/lib/chitragupta/active_support/instrumentation.rb @@ -12,7 +12,7 @@ def process_action(*args) :method => request.method, :path => (request.fullpath.split("?")[0] rescue "unknown"), :request_id => request.uuid, - :ip => request.remote_ip, + :ip => request.remote_ip.first, :log_id => request.headers['X-Chitragupta-log-id'] }