Allow the request ID to be passed in via the `X-Request-Id` header
authorMarko Obrovac <mobrovac@wikimedia.org>
Mon, 22 Apr 2019 20:28:54 +0000 (13:28 -0700)
committerMobrovac <mobrovac@wikimedia.org>
Wed, 15 May 2019 07:27:38 +0000 (07:27 +0000)
commit01c2e25f0a0d5ae142f325773ab623c074d99f59
tree8ae7e19dc6516d3e50a7641c4fab9b6b4e8e95d5
parente34f8705c4eb88cb5ab7ef4b52fa99eca67dc5c3
Allow the request ID to be passed in via the `X-Request-Id` header

For tracing and logging purposes, we want to be able to see/generate the
list of all of the requests that happen in the environment for a given
external incoming request. To that end, allow Mediawiki to accept the
request ID provided by the incoming request as its own.

Since this may be problematic for set-ups that don't have an entity in
front of MW that sanitises the headers on the way in, introduce a new
global variable, `$wgAllowExternalReqID`, that can disable this
behaviour. By default, the feature is disabled.

Bug: T201409
Change-Id: I605471fb8b5bbc290baeecc7d80d9d715cb240c9
RELEASE-NOTES-1.34
includes/DefaultSettings.php
includes/WebRequest.php