From 7d7274a7f151cbd3e490e00dec1313d4c399d7aa Mon Sep 17 00:00:00 2001 From: Michael Wedl Date: Fri, 15 Mar 2024 16:11:37 +0100 Subject: [PATCH] Fix websocket URL builder HTTPS --- frontend/src/utils/collab.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/collab.ts b/frontend/src/utils/collab.ts index 80365b412..3436d2b5d 100644 --- a/frontend/src/utils/collab.ts +++ b/frontend/src/utils/collab.ts @@ -56,7 +56,7 @@ export function useCollab(storeState: CollabStoreState) { return; } - const serverUrl = `${window.location.protocol === 'https' ? 'wss' : 'ws'}://${window.location.host}/`; + const serverUrl = `${window.location.protocol === 'http:' ? 'ws' : 'wss'}://${window.location.host}/`; const wsUrl = urlJoin(serverUrl, storeState.websocketPath); storeState.perPathState.clear(); storeState.connectionState = CollabConnectionState.CONNECTING;