Merge pull request #8548 from demarches-simplifiees/log_ip_and_correlation

feat(log): log ip et correlation id
This commit is contained in:
LeSim 2023-02-02 11:32:52 +01:00 committed by GitHub
commit 7c872be29c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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?