From b795f2ae6996618e9f4578a5a9087f697078440f Mon Sep 17 00:00:00 2001 From: Fraser Steel <81355664+f-steel@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:17:46 +0000 Subject: [PATCH] feat: fix wss protocol back in --- src/_components/Editor/Editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_components/Editor/Editor.tsx b/src/_components/Editor/Editor.tsx index e8b7778..b2a19db 100644 --- a/src/_components/Editor/Editor.tsx +++ b/src/_components/Editor/Editor.tsx @@ -255,8 +255,8 @@ const Editor = React.memo(function EditorC({ id={colabID} // @ts-ignore providerFactory={(id, yjsDocMap) => { - // problems with wss for now, try to use ws - const protocol = 'ws:'; + const protocol = + window.location.protocol === 'https:' ? 'wss:' : 'ws:'; let doc = yjsDocMap.get(id); if (!doc) { doc = new Y.Doc();