diff --git a/src/public/index.html b/src/public/index.html
index 994c3de..ed02481 100644
--- a/src/public/index.html
+++ b/src/public/index.html
@@ -1182,7 +1182,7 @@ function App() {
// WebSocket for live status
useEffect(() => {
function connect() {
- const ws = new WebSocket(`ws://${location.host}/ws`);
+ const ws = new WebSocket(`${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.host}/ws`);
ws.onopen = () => setWsStatus(s => ({ ...s, connected: true }));
ws.onclose = () => { setWsStatus(s => ({ ...s, connected: false })); setTimeout(connect, 3000); };
ws.onerror = () => ws.close();