cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

Cloudflare Tunnel buffers HTTP responses

Open libmartinito opened this issue 2 years ago • 2 comments

Describe the bug It seems that the HTTP responses when using a cloudflare tunnel is buffered.

If it's an issue with Cloudflare Tunnel: 4. Tunnel ID : a327cce8-181d-4a07-8d11-fb3109b2fb6b 5. cloudflared config: Nothing special, just the hostname and the service it points to

Expected behavior It is expected that logs will be streamed real time like this (this was using ngrok):

https://github.com/cloudflare/cloudflared/assets/62695092/fcdb23c5-fff1-4b26-b9be-4d953f300b9e

But, currently it behaves like this:

https://github.com/cloudflare/cloudflared/assets/62695092/1e95dabc-a749-4d09-9c5d-63e091c45d31

Environment and versions

  • OS: MacOS
  • Architecture: ARM
  • Version: Sonoma 14.0

libmartinito avatar Nov 01 '23 15:11 libmartinito

If your response has a Content-Type: text/event-stream header the tunnel will not buffer it

stevehansen avatar Nov 17 '23 14:11 stevehansen

This is a problem for my Remix application and unfortunately the workaround provided by @stevehansen does not work as we have to use text/html for the page to render correctly

adamduren avatar Jan 15 '24 11:01 adamduren