diff --git a/lib/userver.ts b/lib/userver.ts index 951d3b96..5127615f 100644 --- a/lib/userver.ts +++ b/lib/userver.ts @@ -155,7 +155,7 @@ export class uServer extends BaseServer { private handleUpgrade( res: HttpResponse, - req: HttpRequest & { res: any; _query: any }, + req: HttpRequest & { res: any; _query: any; headers: any }, context ) { debug("on upgrade"); @@ -214,9 +214,9 @@ export class uServer extends BaseServer { { transport, }, - req.getHeader("sec-websocket-key"), - req.getHeader("sec-websocket-protocol"), - req.getHeader("sec-websocket-extensions"), + req.headers["sec-websocket-key"], + req.headers["sec-websocket-protocol"], + req.headers["sec-websocket-extensions"], context ); };