WebP from origin never cached (cookie issue?)

We’re doing WebP at our origin, serving them with .webp extension, this is some of our response headers:

Cache-Control: public, max-age=86400
Content-Type: image/webp

The Cf-Cache-Status is always getting “BYPASS”, however the images are served through a dynamic route so they do contain “Set-Cookie” in the response.

Would this prevent CF to never cache it?

If this is the case; Is there a way to filter out the cookies with the response for our specific assets path, and have them cached at Cloudflare without making any changes to our origin?

I removed the cookies from this specific endpoint at the origin and now they are being cached, as I could not find a way to filter this in Cloudflare

I also found out now afterwards, that you can actually remove Set-Cookie header using Transform rules - Modify response header. In combination with a page rule to make it eligible for caching that should also have worked.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.