I’d like to serve private content (json files compressed via gzip) out of S3 storage using worker, but I’d also would like to validate md5 checksum of json responses. I’ve got first part working, but given that by default Cloudflare is decompressing when using
fetch and then compresses them back (gzip or brotli when enabled) obviously md5 checksum does not match (it’s a hash of gzipped filed in S3).
I hoped that if I add cache-control:no-transform and enable ‘origin cache control’ in page rules, then Cloudflare will cache and serve such files as is without compression/decompression, but unfortunately it doesn’t work with workers fetch it seems. Is there a workaround for that? Basically using worker to return unmodified origin files (json gzipped) with Cloudflare cache enabled?