diff options
Diffstat (limited to 'kvmd/web/js/session.js')
-rw-r--r-- | kvmd/web/js/session.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kvmd/web/js/session.js b/kvmd/web/js/session.js index 238ff877..d3bbf91c 100644 --- a/kvmd/web/js/session.js +++ b/kvmd/web/js/session.js @@ -20,7 +20,7 @@ var session = new function() { }; this.startPoller = function() { - __ws = new WebSocket("ws://" + location.host + "/kvmd/ws"); + __ws = new WebSocket((location.protocol == "https:" ? "wss" : "ws") + "://" + location.host + "/kvmd/ws"); __ws.onopen = __wsOpenHandler; __ws.onmessage = __wsMessageHandler; __ws.onerror = __wsErrorHandler; |