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);
},
},
});
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);
},
},
});
No description
No description
No description
1 Reply
Exitium
ExitiumOP13mo ago
to clarify, if I use a nodejs client to connect to the wss://, it just drops immediately, no request reaches the server
Want results from more Discord servers?
Add your server