feat(log): log ip and correlation id

This commit is contained in:
simon lehericey 2023-02-01 17:57:27 +01:00 committed by LeSim
parent 8fee658eba
commit 7461d84018

View file

@ -198,7 +198,9 @@ class ApplicationController < ActionController::Base
payload.merge!({
user_agent: request.user_agent,
user_id: current_user&.id,
user_roles: current_user_roles
user_roles: current_user_roles,
client_ip: request.headers['X-Forwarded-For'],
request_id: request.headers['X-Request-ID']
}.compact)
if browser.known?