We are currently looking into replacing AWS API Gateway with a custom “lambda-proxy” service running on a Cloudflare Worker. However the compressed response received from the intended lambda function seems to be getting re-compressed (gzip) again automatically by Cloudflare.
We have tried setting the “Origin Cache Control -> On using a Page Rule” and cache-control: no-transform at the lambda origin but the double compressions still persists.
We are currently invoking the function using-the fetch interface and have worked around the issue by decompressing the response from Lambda once before returning it back to the request originator, which is far from ideal.
Would any one know of a way to disable/work around this auto compression on the CF worker itself?