diff --git a/app/web/src/utils/sync/ws-client.ts b/app/web/src/utils/sync/ws-client.ts index 6efe778e..d4fd0a39 100644 --- a/app/web/src/utils/sync/ws-client.ts +++ b/app/web/src/utils/sync/ws-client.ts @@ -154,7 +154,9 @@ const connect = ( url.pathname = "/sync"; url.protocol = url.protocol === "http:" ? "ws:" : "wss:"; - const ws = new WebSocket(url.toString()); + const ws = new WebSocket( + `${url.protocol}//${url.hostname}${url.pathname}` + ); ws.onopen = () => { sendWs(ws, { type: SyncType.UserID, user_id, site_id, page_id });