I'm using Node.js/express and if I set the headers
Content-Type: application/json
Content-Encoding: gzip
and send gzipped compressed bodies of JSON data, this works as expected - when not behind Cloudflare.
But if behind Cloudflare and with Brotli compression enabled in the settings, Cloudflare unpacks my gzipped data and sends it to the client compressed it as brotli.
The Cloudflare documentation claims that encoding headers are respected and compression is avoided in in case of gzip or other compression.
Of course, Cache-Control: no-transform
"fixes" the issue. But why should this be needed? Is this a Cloudflare bug or am I doing something wrong?