This allows you to control the outgoing header set by the requests.Session subclass independently of the incoming header.
This is important mostly because Django prepends HTTP_ to its headers in request.META. So if your LOG_REQUEST_ID_HEADER was set to, say, HTTP_X_REQUEST_ID, and you were passing that on to a downstream Django app, it would end up as HTTP_HTTP_X_REQUEST_ID.
This PR maintains the previous behaviour by default so doesn't break backwards compatibility.
This allows you to control the outgoing header set by the
requests.Session
subclass independently of the incoming header.This is important mostly because Django prepends
HTTP_
to its headers inrequest.META
. So if yourLOG_REQUEST_ID_HEADER
was set to, say,HTTP_X_REQUEST_ID
, and you were passing that on to a downstream Django app, it would end up asHTTP_HTTP_X_REQUEST_ID
.This PR maintains the previous behaviour by default so doesn't break backwards compatibility.