I’m using Cloudflare as a very simple CDN/cache server. We always set CORS to allow everything (access-control-allow-origin: *).
In the docs it states:
Identifying cached assets based on the Host Header, Origin Header, URL path, and query. This allows different resources to use the same Host header but different Origin headers.
I think I understand how that would make sense, but in our case always allowing everything, I would rather just cache everything, regardless of origin. We serve content on banner networks, so there could be thousands of origins, which means that often only half of the requests are cached, and the other half reaches the origin (which has a cost).
Is it possible to change this behavious with a setting, or possible with some sort of rewrite rule that would fake the origin at the point where the hit/miss cache decision is made (my knowledge of the Cloudflare stack/ecosystem is very shallow).