We have this middleware in my app because internal security asked us to overwrite these response headers.
class NoCacheControlHeaders
{
public function handle(Request $request, Closure $next)
{
$response = $next($request);
$response->headers->set('Pragma', 'no-cache');
$response->headers->set('Expires', '0');
$response->headers->set('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store, no-transform, private');
return $response;
}
}
Suddenly after upgrade of Livewire to version 3 it doesnt work. HTTP response contain these headers:
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: max-age=0, must-revalidate, no-cache, no-store, private
I set my NoCacheControlHeaders middleware to be executed as last one in Http/Kernel.php's $middlewarePriority, but it doesnt help.