Greetings from Mexico!
I built a website on CF Pages that uses three.js.
There is quite an improvement in the size of my 3D models when I brotli-compress them locally. I am using vite as my build tool and even though the .glb files get brotli-compressed as part of my building process, CF Pages won't serve the compressed version...
The CF docs say that model/gltf-binary is not included in the mime types that get automatically compressed:
https://support.cloudflare.com/hc/en-us/articles/200168396-What-will-Cloudflare-compress-
Someone else had this issue before and it seems a solution might be to "udpate (via workers) the mime on our gltf files to application/json to allow gzip / brotli":
I'm asking you, is that the proper solution?
How can I setup such a worker?
Can you help me sort this out?