Cloudflare Pages compression for deferred responses #9412
Unanswered
JorritSalverda
asked this question in
Q&A
Replies: 1 comment
-
Cloudflare only supports adding additional content types for compression in their enterprise plan - see https://developers.cloudflare.com/rules/compression-rules/#availability - so being able to use one of the already supported content types for deferred content would be nice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using the
defer
keyword to return data to the frontend it sends aContent-Type: text/remix-deferred
header. This unfortunately doesn't has Cloudflare compress it automatically when running on Cloudflare Pages. The supported content types they automatically compress can be found at https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/. Does anyone know a way to force compression in Remix running on Cloudflare Pages? Perhaps it should useContent-Type: application/json
instead of the hardcoded one atremix/packages/remix-server-runtime/server.ts
Line 292 in 7f30f0b
Beta Was this translation helpful? Give feedback.
All reactions