I am unable to disable compression on one of our subdomains

I have one subdomain for which the backend does not not support compression, and does not advertise about it. It only Accepts application/json.

We don’t maintain the software running on this node, but we need to run it.

I searched the internet and found out that Product → Rules → Compression Rules would be the place to change this. But it seems it’s only available for Enterprise customers. Which I totally understand when it’s time to enable compression as it is a convenience feature to improve performance, etc. But to disable it? If the backend doesn’t not know compression it does not know.

Is there a way to continue using Cloudflare for this specific backend? If yes, how I could configure this?

Thank you for any ideas and suggestions.

So application/json would usually be a value of content-type and accept headers, however compression itself is defined by accept-encoding.

Cloudflare will always set accept-encoding: br, gzip when communicating with the origin, and this cannot be changed: Cloudflare HTTP request headers · Cloudflare Fundamentals docs.

Compression Rules are not the answer here either: these are applied between end-user / client and Cloudflare edge, not between Cloudflare edge and your origin.

However, if the issue is with the accept header itself, then you should be able to override its value via Transform Rules before the request is sent to the origin:

1 Like