]> source.dussan.org Git - nextcloud-server.git/commitdiff
Allow TemplateResponse to be compressed 20987/head
authorMorris Jobke <hey@morrisjobke.de>
Fri, 15 May 2020 06:38:39 +0000 (08:38 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Fri, 15 May 2020 06:38:39 +0000 (08:38 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/AppFramework/Middleware/CompressionMiddleware.php

index e0eb0e0883ec11149cde35074e6e4d4c0612c34b..6956be76693e7d7442afdab9ed5f01636425c414 100644 (file)
@@ -29,6 +29,7 @@ use OC\AppFramework\OCS\BaseResponse;
 use OCP\AppFramework\Http;
 use OCP\AppFramework\Http\JSONResponse;
 use OCP\AppFramework\Http\Response;
+use OCP\AppFramework\Http\TemplateResponse;
 use OCP\AppFramework\Middleware;
 use OCP\IRequest;
 
@@ -67,6 +68,9 @@ class CompressionMiddleware extends Middleware {
                if ($response instanceof JSONResponse) {
                        $allowGzip = true;
                }
+               if ($response instanceof TemplateResponse) {
+                       $allowGzip = true;
+               }
 
                if ($allowGzip) {
                        $this->useGZip = true;