From dbb4904513e1829a4c59f49a15d5aa738ad712ec Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Thu, 3 Mar 2016 16:41:41 +0800 Subject: [PATCH] fix(webterminal): test --- static/js/webterminal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/webterminal.js b/static/js/webterminal.js index 6647ca8e6..ca16cd8e8 100644 --- a/static/js/webterminal.js +++ b/static/js/webterminal.js @@ -13,7 +13,7 @@ WSSHClient.prototype._generateEndpoint = function (options) { var protocol = 'ws://'; } - var endpoint = protocol + window.location.host + ':8080' + '/terminal'; + var endpoint = protocol + document.URL.match(RegExp('//(.*?)/'))[1] + '/ws/terminal'; return endpoint; }; WSSHClient.prototype.connect = function (options) {