mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
3a5bb98b70
Addresses review feedback on the prior commit:
- The shared cache middleware should not hardcode `image/*`. Replace the
inline content-type check with a generic `cache.contentType` route
label (a prefix match). Each route that opts into caching now declares
`->label('cache.contentType', 'image/')` alongside `->label('cache', true)`.
- A public `Cache-Control: no-cache` bypass is a DDoS vector on expensive
pipelines (Imagick transforms, Chromium screenshots). Restrict the
bypass to privileged callers — API keys, admin console, and other
server-side contexts — so only trusted traffic can force-miss the cache.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>