We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot use auth()->logout() after at the httpcache middleware, It still logged in, so I have to modify the kernel like this.
public function handle($request) { $ignores = [ "login", "logout", "auth(.+)", "admin(.+)", "register", ]; $pattern = implode('|', $ignores); // Ignore middleware from some routes. if (! preg_match('~'.$pattern.'~', $request->path())) { $this->prependMiddleware('Barryvdh\HttpCache\Middleware\ParseEsi'); $this->prependMiddleware('Barryvdh\HttpCache\Middleware\CacheRequests'); } return parent::handle($request); }
The text was updated successfully, but these errors were encountered:
Probably somewhat cleaner solution could be to use POST for logout – POST requests should not be cached.
See Symfony's HttpCache documentation
Sorry, something went wrong.
Thank you, That's works!
No branches or pull requests
I cannot use auth()->logout() after at the httpcache middleware, It still logged in, so I have to modify the kernel like this.
The text was updated successfully, but these errors were encountered: