Skip to content
Snippets Groups Projects
Unverified Commit f80f2a22 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #20987 from nextcloud/feature/noid/allow-compressed-templateresponses

Allow TemplateResponse to be compressed
parents 385b0608 4e49e1da
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment