Request header based response

Hello, my first post here, I hope that my question is not duplicate.
I would like to add some URL rewriting to my webserver, based on the Accept header of the client (I would like to serve “old style” JPG when image/webp is not accepted).
This means that Cloudflare should cache different contents for different request headers to make it work as I expect.

Does Cloudflare caches different contents for different Accept headers?


In short, no, if you want Cloudflare to cache the images, you cannot Vary on your origin.

The easiest solution to meet your requirement is to enable Cloudflare Polish, which in included in all paid plans.

1 Like

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