diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-15 17:09:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 17:09:10 +0300 |
commit | f80f2a22d702efacaf7226f5ee60d76d6b637061 (patch) | |
tree | cf7e225025d027876e4c14fef54f6baa44b08340 /lib | |
parent | 385b060893e58fdf2276cb579eb973dc61cef784 (diff) | |
parent | 4e49e1da1624337a92022a25c8315d3758058224 (diff) |
Merge pull request #20987 from nextcloud/feature/noid/allow-compressed-templateresponses
Allow TemplateResponse to be compressed
Diffstat (limited to 'lib')
-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; |