aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Http')
-rw-r--r--lib/public/AppFramework/Http/Response.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index ee10d483b25..ad2280ab9da 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -33,6 +33,7 @@ namespace OCP\AppFramework\Http;
use OCP\AppFramework\Http;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
+use OCP\IRequest;
use Psr\Log\LoggerInterface;
/**
@@ -94,6 +95,12 @@ class Response {
* @since 17.0.0
*/
public function __construct() {
+ /** @var IRequest $request */
+ /**
+ * @psalm-suppress UndefinedClass
+ */
+ $request = \OC::$server->get(IRequest::class);
+ $this->addHeader("X-Request-Id", $request->getId());
}
/**