Stop Cache-Tag from being removed from response header

Hello,

Does anyone know how to stop Cloudflare from removing the Cache-Tag header on the response? According to this documentation, the Cache-Tag is always removed so that the end user does not see the header. In my case, the end user is a CDN that needs to see this header for further cache processing outside of Cloudflare.

https://support.cloudflare.com/hc/en-us/articles/206596608-How-to-Purge-Cache-Using-Cache-Tags-Enterprise-only-

I’ve tried to use Workers to add the Cache-Tag header back to the response, but it is still removed once the response is returned from the Worker. I’ve also looked into Page Rules but don’t see anything there to help either.

I understand that Cache-Tag is an Enterprise only feature, and I don’t want to use it on Cloudflare at the moment due to costs of that plan. But since I’m not using it at all it would be great for Cloudflare to somehow ignore it completely. Does anyone know if this is possible?

Thanks for your help.

Is there any reason why your can’t directly connect another CDN to your server? What’s the benefit of double CDN?

AFAIK you can’t control some headers on Cloudflare and Cache-Tag is one of them.

nikoloz,

The responses I’m caching are JSON, and I need to be able to expire documents tagged with a Cache-Tag on demand. Ideally I would use Cloudflare for this, but that functionality is Enterprise only and out of my price range for the foreseeable future. So I’m using another CDN with much cheaper pricing for this. I want to still use Cloudflare for things other than caching, such as load balancing and Workers.

If you can give us more details maybe we can figure out solution using Cloudflare Workers :slight_smile:

Since you have to pay another CDN anyway, I don’t think it will cost you less than $0.5 per million requests (Pricing of Cloudflate Workers).

This topic was automatically closed after 14 days. New replies are no longer allowed.