Public Device URL tunnel not working as expected

I have the following simple code which I execute with PHP’s built-in webserver (php -S

header("Cache-Control: no-cache");
header("Content-Type: text/event-stream");

while (true) {
   echo 'data: test', "\n\n";

   while (ob_get_level() > 0)

   if (connection_aborted())


When viewing the Public Device URL there is zero output. If however, I shut off the Public URL and use (ngrok http 80) to create an introspecting tunnel, the script functions as expected; it produces output every 5 seconds. Why is there no output when using the Public Device URL?

Hey, I just wanted to let you know that we have managed to reproduce the problem and are looking into it. It seems that the issue may be in how the public URL tunnel treats streams of incoming data. We will update you as soon as we get to the bottom of this.