collaboration module cleanup x2

This commit is contained in:
Philipinho
2024-05-04 17:21:44 +01:00
parent 8cfc42b79a
commit a2768e7d30
6 changed files with 47 additions and 21 deletions
@@ -7,8 +7,8 @@ export class CollabWsAdapter {
this.wss = new WebSocketServer({ noServer: true });
}
handleUpgrade(path: string, httpServer) {
httpServer.on('upgrade', (request, socket, head) => {
handleUpgrade(path: string, httpServer: any) {
httpServer.on('upgrade', (request: any, socket: any, head: any) => {
try {
const baseUrl = 'ws://' + request.headers.host + '/';
const pathname = new URL(request.url, baseUrl).pathname;