diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-05-15 08:38:39 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-05-15 08:38:39 +0200 |
commit | 4e49e1da1624337a92022a25c8315d3758058224 (patch) | |
tree | 75246181762b6c58a6cd07bb26a20f10c0e912f5 /lib/private/AppFramework/Middleware | |
parent | d132f81d28b4dbc4dbfd650f2bcfb34474fc0f4c (diff) | |
download | nextcloud-server-4e49e1da1624337a92022a25c8315d3758058224.tar.gz nextcloud-server-4e49e1da1624337a92022a25c8315d3758058224.zip |
Allow TemplateResponse to be compressed
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/AppFramework/Middleware')
-rw-r--r-- | lib/private/AppFramework/Middleware/CompressionMiddleware.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Middleware/CompressionMiddleware.php b/lib/private/AppFramework/Middleware/CompressionMiddleware.php index e0eb0e0883e..6956be76693 100644 --- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php +++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php @@ -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; |