From 041184e3a5a9a8948c6c6165121d68269cc5d190 Mon Sep 17 00:00:00 2001 From: shaoying Date: Sun, 22 Sep 2019 16:02:23 +0800 Subject: [PATCH] add web.wss --- usr/librarys/context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }