rails/rails — pull request #17522 by vipulnsward (2014-11-05 13:25:56+00:00)
Title: Custom header for request id

This is based on https://github.com/rails/rails/commit/afde6fdd5ef3e6b0693a7e330777e85ef4cffddb#commitcomment-690537 (Three years later) .

The change allows `config.action_dispatch.request_id_header` to set custom header key used for setting unique request id value. Defaults is set to `'X-Request-Id'`.
Based on the key, custom value will be set for the key on response.headers.

Example:

config.action_dispatch.request_id_header = 'X-REQUEST-ID'

will set response header for request id on `X-REQUEST-ID` key.
cc @josevalim