Skip to content

Commit

Permalink
fix: exclude reset password page from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Feb 5, 2025
1 parent 8a9bd3a commit 5550062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Middleware/CacheControlMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface

$routeName = $request->getAttribute('routeName');

// Exclude FriendsOfFlarum/OAuth routes
if (Str::startsWith($routeName, ['auth', 'fof-oauth'])) {
// Exclude auth routes
if (Str::startsWith($routeName, ['auth', 'fof-oauth']) || $routeName === 'resetPassword') {
return $this->withCacheControlHeader($response, 'no-cache');
}

Expand Down

0 comments on commit 5550062

Please sign in to comment.