diff --git a/usr/librarys/context.js b/usr/librarys/context.js index 4d53d181..c46d7eaf 100644 --- a/usr/librarys/context.js +++ b/usr/librarys/context.js @@ -205,7 +205,7 @@ ctx = context = { xhr.send(args.join("&")) }, WSS: function(cb) { - var s = new WebSocket("ws://"+location.host+"/wss") + var s = new WebSocket(location.protocol.replace("http", "ws")+"://"+location.host+"/wss") s.onopen = function(event) { kit.Log(event) }