Fix logout back - #300
Conversation
- Update global Cache-Control to 'no-store, no-cache, must-revalidate'
for all GET requests to prevent back button from showing old pages
- Add cache prevention headers (Cache-Control, Pragma, Expires) to
logout response
This fixes the issue where pressing back button after logout would
display cached authenticated pages. While the session is invalid and
any action redirects to login, users should not see stale content.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Global GET filter missing Pragma and Expires headers The PR is fixing a bug where pressing the browser's back button after
The inconsistency: the three legacy headers (Pragma, Expires) were added to In practice, Cache-Control: no-store alone is sufficient for all modern Those are missing: |
Bug Description
After logout, pressing the browser's back button displayed cached authenticated pages. While the session was properly invalidated server-side (any action would redirect to login),
showing stale content was confusing and appeared insecure to users.
Fix
Strengthened cache control to
no-store, no-cache, must-revalidateto prevent browsers from caching authenticated pages entirely.