Streaming is buffered when Cloudflare proxy is on?

I'm deploying an edge function on Vercel. It streams a response and it works just fine when Cloudflare proxy is disabled.

But, when the proxy is enabled, it seems it buffers the stream and send it as a whole once it's done. How is it possible?

The weird thing is that it worked a few days ago with proxy enabled as well.

I also tried to set these headers in the response to tell Cloudflare not to "cache anything":

'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate',
 Pragma: 'no-cache',


I just don't know what to do now...
Was this page helpful?