From 4c3845190861a34c5af926cda10683e8158a0786 Mon Sep 17 00:00:00 2001 From: dewanakl Date: Fri, 31 May 2024 13:41:43 +0700 Subject: [PATCH] feat: update framework --- app/Error/Error.php | 6 ++---- app/Middleware/GzipMiddleware.php | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Error/Error.php b/app/Error/Error.php index ebceba4..410c614 100644 --- a/app/Error/Error.php +++ b/app/Error/Error.php @@ -3,20 +3,18 @@ namespace App\Error; use Core\Support\Error as BaseError; -use Throwable; class Error extends BaseError { /** * Tampilkan errornya. * - * @param Throwable $th * @return mixed */ - public function render(Throwable $th): mixed + public function render(): mixed { // - return parent::render($th); + return parent::render(); } } diff --git a/app/Middleware/GzipMiddleware.php b/app/Middleware/GzipMiddleware.php index 4c01773..698023f 100644 --- a/app/Middleware/GzipMiddleware.php +++ b/app/Middleware/GzipMiddleware.php @@ -45,8 +45,7 @@ public function handle(Request $request, Closure $next): Stream|Respond $response->headers ->set('Vary', join(', ', $vary)) - ->set('Content-Encoding', 'gzip') - ->set('Content-Length', strlen($compressed)); + ->set('Content-Encoding', 'gzip'); return $response; }