mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-20 04:36:42 +00:00
Update main.js
in this way we can use query string parameters on index.html without websocket errors
This commit is contained in:
@@ -210,7 +210,7 @@ jQuery(function($){
|
||||
return;
|
||||
}
|
||||
|
||||
var ws_url = window.location.href.replace('http', 'ws'),
|
||||
var ws_url = window.location.href.split('?')[0].replace('http', 'ws'),
|
||||
join = (ws_url[ws_url.length-1] === '/' ? '' : '/'),
|
||||
url = ws_url + join + 'ws?id=' + msg.id,
|
||||
sock = new window.WebSocket(url),
|
||||
|
||||
Reference in New Issue
Block a user