webconsole support wss (#1401)

pull/1403/head
dupengcheng 5 years ago committed by GitHub
parent b7af332d5f
commit ce11773865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);
}

Loading…
Cancel
Save