Content-Encoding header from S3 not forwarded by CDN in response

I have 9mb data.br file that is uploaded to s3 with Content-Encoding: br . It is proxied via cloudflare, and when the browser fetches this file, it becomes 20mb. and the Content-Encoding: br is missing

Cloudflare response headers
date: Tue, 20 May 2025 22:10:51 GMT
content-type: application/octet-stream
server: cloudflare
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=fJiUVeoQSu4XfkBHTxeQCo8dfPMJK%2FNoB0EBuLj6Xv1%2F%2Bjd6Ji5VAhSc3t%2Bzq310LL%2B27M5hQ3mYjGB8U0cNNPV8f3%2BPkXp%2BupA3aV%2BZbyy4w5kVNpyuhnXPDsQ%3D"}]}
x-amz-id-2: AurutiarAgSrCmNi2Y+f14tkn3byJmzLwtogcis17qyNN2+WG8fzO5ieYtX6Buk2HfroqGkMpX6VuFVNeyr3uYLr1swOB9HwjAalQKNH9lM=
x-amz-request-id: 9S9VMCYTVW9XDRM6
cache-control: public, max-age=31536000, immutable
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
last-modified: Tue, 20 May 2025 22:07:40 GMT
cf-cache-status: HIT
age: 83
etag: W/"5c16dfd11921fcde09976ea50372d85f-2"
cf-ray: 942f2aa2ac6474a7-YYZ
alt-svc: h3=":443"; ma=86400


S3 response headers
x-amz-id-2: OI9O4Gx+GLWW4Brc/mgWuYD0B7tN6TVsLyCXRhknA8xViHWC2ksy/vl0LhRyYWvy2MsGcMMUmeKpucijuakzQdKLktDb4748iMMJW84SUxc=
x-amz-request-id: 3QH1XP5JB6QPRN31
Date: Tue, 20 May 2025 22:24:21 GMT
Last-Modified: Tue, 20 May 2025 22:07:40 GMT
ETag: "5c16dfd11921fcde09976ea50372d85f-2"
x-amz-server-side-encryption: AES256
Cache-Control: public, max-age=31536000, immutable
Content-Encoding: br
Accept-Ranges: bytes
Content-Type: application/octet-stream
Content-Length: 9580150
Server: AmazonS3


I also have a cache rule that makes (http.request.uri.path.extension in {"br" "png" "mp3"}) eligible for cache.

What might be wrong?
Was this page helpful?