Browse Source

Fixed a bug caused by url containing hashes

static
Sheng 6 years ago
parent
commit
d69d8cfa7a
  1. 2
      webssh/static/js/main.js

2
webssh/static/js/main.js

@ -210,7 +210,7 @@ jQuery(function($){
return;
}
var ws_url = window.location.href.split('?')[0].replace('http', 'ws'),
var ws_url = window.location.href.split(/\?|#/, 1)[0].replace('http', 'ws'),
join = (ws_url[ws_url.length-1] === '/' ? '' : '/'),
url = ws_url + join + 'ws?id=' + msg.id,
sock = new window.WebSocket(url),

Loading…
Cancel
Save