From a9f677ae0ceb1b63a5df7eea4cfaaa09b6019e46 Mon Sep 17 00:00:00 2001 From: JHansen <47265397+UserJHansen@users.noreply.github.com> Date: Fri, 27 Aug 2021 14:13:11 +1000 Subject: [PATCH] Make connect handler return url --- lib/websocket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/websocket.ts b/lib/websocket.ts index 914913d..ca34aec 100644 --- a/lib/websocket.ts +++ b/lib/websocket.ts @@ -52,7 +52,7 @@ export class WebSocketServer extends EventEmitter { } const ws: WebSocketAcceptedClient = new WebSocketAcceptedClient(sock); this.clients.add(ws); - this.emit("connection", ws); + this.emit("connection", ws, req.url); } catch (err) { this.emit("error", err); await req.respond({ status: 400 });