Skip to content
Snippets Groups Projects
Unverified Commit 4e49e1da authored by Morris Jobke's avatar Morris Jobke
Browse files

Allow TemplateResponse to be compressed


Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent d132f81d
No related branches found
No related tags found
Loading
......@@ -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