Accept-encoding - original header

is it possible to be sent the accept-encoding header unmodified by CF? CF only sends gzip header, fine I understand why.

But as part of a browser check, i check if the browser accepts br.

any insight appreciated.

Hi there,

As far as I know, changing this behaviour is not possible due to technical reasons, as this header indicated which type of encoding the response should use that we are able to handle. Depending on what you need this for, there might be an alternative way to solve what you are trying to achieve.

I block browsers that claim to be for example, chrome, but do not send an expected accept-encoding header (i.e. it may be omitted or missing br). It’s an easy way for me to filter out bot traffic.

Thanks for clarifying. You might want to check if the request comes from Cloudflare. If it does, use Cloudflare’s built-in firewall to block bot traffic. If the request is not from Cloudflare, use your own script, which should work perfectly fine then.

hi, thank you. Unfortunately for me, I have more than 5 domains that I would apply that rule for, and the same rule would count individually per domain as I understand it. It’s not economically viable for me right now.

edit: I meant firewall rule, not page rule

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