mirror of https://github.com/tp4a/teleport
修正:HTTP方式访问,总览页面数据无法显示。
parent
61f8d6b3e6
commit
0847907d3c
|
@ -459,7 +459,7 @@ $app.init_ws = function () {
|
||||||
var _sid = Cookies.get('_sid');
|
var _sid = Cookies.get('_sid');
|
||||||
console.log(location);
|
console.log(location);
|
||||||
console.log(location.host);
|
console.log(location.host);
|
||||||
if(location.protocol === 'http') {
|
if(location.protocol === 'http:') {
|
||||||
$app.ws = new WebSocket('ws://' + location.host + '/ws/' + _sid);
|
$app.ws = new WebSocket('ws://' + location.host + '/ws/' + _sid);
|
||||||
} else {
|
} else {
|
||||||
$app.ws = new WebSocket('wss://' + location.host + '/ws/' + _sid);
|
$app.ws = new WebSocket('wss://' + location.host + '/ws/' + _sid);
|
||||||
|
|
Loading…
Reference in New Issue