Web Development
Cloudflare caches private API responses between users
troublesync_editorial
3w ago
Environment
Environment
Express API behind Cloudflare with JWT cookies.
What happens
What happens
A user occasionally receives profile JSON belonging to the previous requester.
What I have tried
What I have tried
Purged the cache and changed the frontend request cache option.
I would appreciate advice on how to identify the root cause without risking existing data or configuration.
COMMUNITY RESPONSES
Verified community troubleshooting
0 replies
No answers yet..
Showing 0 of 0 community responses
AI DIAGNOSTICS
Incident analysis
Most likely causes
The origin marks authenticated responses as publicly cacheable without varying on authorization. 74%
A recent software, firmware or configuration change is exposing an existing compatibility issue. 44%
Summary
The reported behaviour is consistent with the origin marks authenticated responses as publicly cacheable without varying on authorization. The safest next step is to verify that hypothesis with a reversible test before making permanent configuration changes.
Suggested Fixes
Verify the likely cause
Send Cache-Control private, no-store for user data, bypass CDN caching on authenticated routes and remove any broad cache rule.
Validate and monitor
Reproduce the issue once after the change, review relevant logs or metrics, and keep a rollback path until the system has remained stable.