diff options
author | Devaev Maxim <[email protected]> | 2018-08-09 04:06:44 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-08-09 04:06:44 +0300 |
commit | e3f5d1e4d60a7e56c4113b00101aae95881db464 (patch) | |
tree | 49a3a27ab897f6864d04f329546a3dbe77e2a4e3 /kvmd/web | |
parent | f71788bb35b810ff79d321e5914edcf554e00c60 (diff) |
using https with self-signed cert
Diffstat (limited to 'kvmd/web')
-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; |