X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FRequest.php;h=d61303d5d729f410c8776aec4d534f04e53629b1;hb=e659a0314086dd700dbe5e754e383ab758725805;hp=71b6a9ea3f088f4d160c76ccde3253a69979ff08;hpb=8db0e090d7afc3fbfeaf7a587140c80c98233484;p=friendica.git diff --git a/src/App/Request.php b/src/App/Request.php index 71b6a9ea3f..d61303d5d7 100644 --- a/src/App/Request.php +++ b/src/App/Request.php @@ -1,6 +1,6 @@ remoteAddress; } + /** + * @return string The request ID of the current request + * + * Do always use this instead of $_SERVER['X_REQUEST_ID'] + */ + public function getRequestId(): string + { + return $this->requestId; + } + public function __construct(IManageConfigValues $config, array $server = []) { $this->remoteAddress = $this->determineRemoteAddress($config, $server); + $this->requestId = $server[static::DEFAULT_REQUEST_ID_HEADER] ?? System::createGUID(8, false); } /**