cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
Apache License 2.0
8.47k stars 740 forks source link

Cloudflare Tunnel buffers HTTP responses #1095

Open libmartinito opened 8 months ago

libmartinito commented 8 months ago

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

If it's an issue with Cloudflare Tunnel:

  1. Tunnel ID : a327cce8-181d-4a07-8d11-fb3109b2fb6b
  2. 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

stevehansen commented 7 months ago

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

adamduren commented 5 months ago

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