Allow TemplateResponse to be compressed
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
d132f81d28
commit
4e49e1da16
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue