hkhl.
01/04/2024, 12:41 PMHTTP 415 Unsupported Media type
and Cf-resized: err=9412
long after the origin image upload is complete (~ 60 min.) The only way to fix this is to purge the complete cache in the dashboard manually.
I did a lot of debugging, and I don't see why Cloudflare does not revalidate the origin.
- There is no custom caching in the worker
- The origin does not send cache-control headers.
- Manually purging a single upstream URL as described here https://developers.cloudflare.com/images/image-resizing/troubleshooting/#caching-and-purging does not work. (So it is some kind of cache issue)hkhl.
01/04/2024, 12:41 PMContent-Type: application/xml, No Etag, No Cache-Control, No Last-Modified-At
)
2) HTTP 200 (Content-Lenght: 0, Content-Type: image/jpeg, ETag: .., Last-Modified-At: ..., No Cache-Control
)
3) HTTP 200 (Content-Lenght: ... , Content-Type: image/jpeg, ETag: .., Last-Modified-At: ..., No Cache-Control
)
Stage 3 definitely returns the correct Image (it is picked up after the complete cache purge)
I can see that stage 2 should trigger Error 9412 /HTTP 415, but it sends no Cache-Control
, a different ETag
, and a Last -Modified-At
that is before the stage 3 Last-Modified-At
.
Any stage 3 revalidation requests from Cloudflare with If-Modified-Since
or If-None-Match
would return the full image (I double-checked with curl), but it seems that Cloudflare caches the upstream response of stage 2 forever.
Is this the expected behaviour? It only happens when there are resizing requests during stage 2 (That's why it never happened before going to production)