Privacy can be lost at the proxy
Authentication on the origin does not automatically make every intermediary cache safe. A route-level CDN rule can cache a private response under a URL shared by several users. Review the actual deployed response and cache behavior, not only backend source code.
What to do next
- 01
Identify private response routes
List media, chat JSON, thumbnails and task-specific metadata that your application serves after authorization. Keep their caching policy separate from public documentation and static assets, which can use different performance strategies.
- 02
Set policy at the final boundary
Apply the reviewed private no-store headers where the response leaves your application, including error and partial-content paths where appropriate. Inspect CDN rules for overrides, forced caching or cache keys that ignore user-specific context.
- 03
Test across two sessions
Fetch a synthetic private asset as one authorized test user, then request the same route as another user or without a session. Confirm no cached body bypasses the application's authorization decision and inspect cache-status diagnostics.
A concrete example
Illustrative example: a backend proxy downloads a private image and returns a new response. Its final response explicitly remains private and non-storable, and a second session cannot receive the first session's bytes from an edge cache.
Before you call it ready
- Final responses retain the private policy.
- CDN overrides are reviewed.
- Cross-session cache tests use synthetic assets.
When to stop or choose another method
Stop enabling shared caching for authenticated result routes until cache keys, authorization and intermediary behavior have been verified together.
