You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I am using a custom authentication system. After the user is logged out and when he clicks on the browser back button, He can still see the page. How to avoid this? I am already using a middleware for back button.
Back Button Disable Middleware Code
public function handle(Request $request, Closure $next)
{
$response = $next($request);
$response->headers->set('Cache-Control', 'nocache, no-store, max-age=0, must-revalidate');
$response->headers->set('Pragma', 'nocache');
$response->headers->set('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT');
return $response;
}
The text was updated successfully, but these errors were encountered:
Hey! I am using a custom authentication system. After the user is logged out and when he clicks on the browser back button, He can still see the page. How to avoid this? I am already using a middleware for back button.
Back Button Disable Middleware Code
The text was updated successfully, but these errors were encountered: