From 5e64ef848dd5d95e6b66d0219b845eda6c21e7b1 Mon Sep 17 00:00:00 2001 From: Alexander Bentkamp Date: Wed, 16 Nov 2022 11:52:52 +0100 Subject: [PATCH] use wss protocol --- client/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index ec5e56a..868c099 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -24,7 +24,7 @@ function App() { const [finished, setFinished] = useState(false) const [rpcConnection, setRpcConnection] = useState(null) - const socketUrl = 'ws://' + window.location.host + '/websocket/' + const socketUrl = ((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.host + '/websocket/' useWebSocket(socketUrl, { onOpen: function (ev) {