From 00ce83d7e75a06f75380cc5a2130f99a8cb6bd88 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 8 Nov 2024 19:30:20 +0100 Subject: [PATCH 1/2] feat: add header --- src/Response.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index 5210ed34..43e1dc74 100755 --- a/src/Response.php +++ b/src/Response.php @@ -529,7 +529,6 @@ public function send(string $body = ''): void $serverHeader = $this->headers['Server'] ?? 'Utopia/Http'; $this->addHeader('Server', $serverHeader); - $this->addHeader('X-Debug-Speed', (string) (microtime(true) - $this->startTime)); $this->appendCookies(); @@ -544,10 +543,12 @@ public function send(string $body = ''): void if ($algorithm) { $body = $algorithm->compress($body); $this->addHeader('Content-Encoding', $algorithm->getContentEncoding()); + $this->addHeader('X-Utopia-Compression', '1'); $this->addHeader('Vary', 'Accept-Encoding'); } } + $this->addHeader('X-Debug-Speed', (string) (microtime(true) - $this->startTime)); $this->appendHeaders(); // Send response From 7c9e4411bb7ae574a2975cc0ed722aa828628b2c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 8 Nov 2024 19:45:35 +0100 Subject: [PATCH 2/2] chore: update to true --- src/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index 43e1dc74..eccdb26b 100755 --- a/src/Response.php +++ b/src/Response.php @@ -543,7 +543,7 @@ public function send(string $body = ''): void if ($algorithm) { $body = $algorithm->compress($body); $this->addHeader('Content-Encoding', $algorithm->getContentEncoding()); - $this->addHeader('X-Utopia-Compression', '1'); + $this->addHeader('X-Utopia-Compression', 'true'); $this->addHeader('Vary', 'Accept-Encoding'); } }