F
Filament8mo ago
Wiin

Problem with gzip middleware

Hello, for some reason when setting up my gzip middleware I'm getting a blank page on filament panels. The middleware is working fine for non-filament pages. I think the problem is related to some script not loading correctly after decompressing, but I'm not completely sure. Does anyone have any idea of what could be happening? Thanks. //Middleware class GzipEncodeResponse { /** * Handle an incoming request. * * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ public function handle(Request $request, Closure $next): Response { $response = $next($request); if (in_array('gzip', $request->getEncodings()) && function_exists('gzencode')) { $response->setContent(gzencode($response->getContent(), 9)); $response->headers->add([ 'Content-Encoding' => 'gzip', 'X-Vapor-Base64-Encode' => 'True', ]); } return $response; }
2 Replies
Kristijan
Kristijan6mo ago
I have the same problem. Still not resolved.
Want results from more Discord servers?
Add your server