Move X-Request-Id header name to ActionDispatch::Constants

This commit is contained in:
Guillermo Iguaran 2023-07-27 16:03:52 -07:00
parent 5b45803984
commit ff232b1190
2 changed files with 3 additions and 1 deletions

@ -10,11 +10,13 @@ module Constants
CONTENT_ENCODING = "Content-Encoding"
LOCATION = "Location"
FEATURE_POLICY = "Feature-Policy"
X_REQUEST_ID = "X-Request-Id"
else
VARY = "vary"
CONTENT_ENCODING = "content-encoding"
LOCATION = "location"
FEATURE_POLICY = "feature-policy"
X_REQUEST_ID = "x-request-id"
end
end
end

@ -24,7 +24,7 @@ class Railtie < Rails::Railtie # :nodoc:
config.action_dispatch.use_authenticated_cookie_encryption = false
config.action_dispatch.use_cookies_with_metadata = false
config.action_dispatch.perform_deep_munge = true
config.action_dispatch.request_id_header = "X-Request-Id"
config.action_dispatch.request_id_header = ActionDispatch::Constants::X_REQUEST_ID
config.action_dispatch.log_rescued_responses = true
config.action_dispatch.debug_exception_log_level = :fatal