webconsole support wss (#1401)

This commit is contained in:
dupengcheng
2020-08-04 10:44:16 +08:00
committed by GitHub
parent b7af332d5f
commit ce11773865
@@ -78,7 +78,8 @@ function getTerminalSize () {
/** init websocket **/
function initWs (ip, port, agentId) {
var path = 'ws://' + ip + ':' + port + '/ws?method=connectArthas&id=' + agentId;
var protocol= location.protocol === 'https:' ? 'wss://' : 'ws://';
var path = protocol + ip + ':' + port + '/ws?method=connectArthas&id=' + agentId;
ws = new WebSocket(path);
}