End-to-end compression for pages

For Workes & Pages, what is the name of the domain?

tmp.wide.video

What is the issue or error you’re encountering

Provided static assets are br compressed, CF to visitor responds with gzip

What steps have you taken to resolve the issue?

I have followed doc on End-to-End compression on Content compression | Brotli · Cloudflare Speed docs and disabled all the listed features:

Automatic HTTPS Rewrites: Off
Cloudflare Fonts: Off
Email Address Obfuscation: Off
Mirage: Off
Polish: Off
Rocket Loader: Off
Javascript detections: Security / WAF / Custom rule
(http.request.full_uri wildcard r"*") → skip “All Super Bot Fight Mode Rules”
RUM: Analytics & Logs / Web Analytics / Togggle Web Analytics
Off
Replace insecure JS: Security > Settings > For Replace insecure JavaScript libraries
Off

I have uploaded some static assets that are brotli compressed served with headers:

/*.js
	Content-Encoding: br

Made a request using chrome accept-encoding:gzip, deflate, br, zstd

However gzip compressed response is coming from CF.

I have followed other topics:

but there is no new informaion that would help fixing the issue

I have also followed https://blog.cloudflare.com/this-is-brotli-from-origin/ … and tried Cache-Control: no-transform but still not success.

Following topics are also related

It seems there are a few topics created to the same issue, with rather small/temporary success. May it be that by introducing new CF features to be explicitly turned off, the set of rules in docs (Content compression | Brotli · Cloudflare Speed docs) are not uptodate?

Would it be possible to have updated docs or even better a feature form, that would check particular request and detect what is wrong with end-to-end compression for a particular file.

Using Cache-Control: no-transform I am able to get the originally compressed asset via tmp-dug.pages.dev however, requesting the very same file using custom domain tmp.wide.video I get a recompressed file.

I do not have any domain specific rules so what cause it to have a different response from *.pages.dev domain vs. my custom domain?

curl commands used for testing

curl -o studio.js  https://tmp-dug.pages.dev/studio.js -w '%{size_download}' -sH 'Accept-encoding: br'
curl -o studio.js  https://tmp.wide.video/studio.js -w '%{size_download}' -sH 'Accept-encoding: br'

Eventually I managed to have end-to-end compression working on custom domain:

  1. have static assets like .js precompressed on the origin (in my case origin = cloudflare pages.dev)
  2. serve it with _headers file like
/*.js
	Content-Encoding: br
	Cache-Control: no-transform
  1. disable proxy in CNAME DNS record (following advice in Different behavior between pages.dev and alias custom domain - #3)
  2. follow Content compression | Brotli · Cloudflare Speed docs and turn Off the needed. I did so many changes back and forth so I am not able to tell which are essential. This step is potentially not needed at all as DNS proxy is not in use.

I understand that having DNS proxy off, defeats the whole purpose of CF (caching etc.),
but as I was not able to get things working using proxied record, I will have to stick with the current less elegant solution until someone can help me figure out the missing bits.