When using a service hosted by Cloudflare, like my real case (https://registry.npmjs.org/node-fetch), which uses the Accept header in a custom way (with the value application/vnd.npm.install -v1+json), Cloudflare becomes unable to compress the response in gzip, as it uses just the same header types to compress (such as application/json).
My question is: is there any way to force compression via gzip, even when the Accept header is not supported? Even sending Accept-Encoding: gzip this is not being respected.
The response will not have a Content-Encoding: gzip. But if you drop the Accept from request header, then it will have. But it changes de content behaviour, because the Registry NPM API needs that exactly as application/vnd.npm.install-v1+json.