Unable to open a websocket with a CF tunnel

If I connect to remote.exitium.uk, and host an application there (I have the below one running), I simply get 'Upgrade failed :('
Is there any additional configuration I need to do, as to enable websocket functionality (it's not disabled in the dashboard)

Bun.serve({
  port: 8080,

  fetch(req, server) {
    if (server.upgrade(req)) {
      return;
    }
    return new Response("Upgrade failed :(", { status: 500 });
  },
  tls: {
    key: Bun.file("./cfkey.pem"),
    cert: Bun.file("./cforigin.pem"),
  },
  websocket: {
      open(ws) {
          ws.send("Hello from Bun!");
      },

      message(ws, message) {
          ws.send(message);
      },
  },
});
image.png
image.png
image.png
Was this page helpful?