This commit is contained in:
zvs001 2018-06-17 17:19:44 +00:00 committed by GitHub
commit 5edc213fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ recordings
*.swp *.swp
*~ *~
noVNC-*.tgz noVNC-*.tgz
.idea/

View File

@ -161,7 +161,9 @@ const UI = {
UI.initSetting('resize', 'off'); UI.initSetting('resize', 'off');
UI.initSetting('shared', true); UI.initSetting('shared', true);
UI.initSetting('view_only', false); UI.initSetting('view_only', false);
UI.initSetting('path', 'websockify');
let socketUrl = (window.location.pathname || '/').replace(/\/([^/]+)?$/, '/websockify');
UI.initSetting('path', socketUrl || '/websockify');
UI.initSetting('repeaterID', ''); UI.initSetting('repeaterID', '');
UI.initSetting('reconnect', false); UI.initSetting('reconnect', false);
UI.initSetting('reconnect_delay', 5000); UI.initSetting('reconnect_delay', 5000);
@ -1019,7 +1021,7 @@ const UI = {
if(port) { if(port) {
url += ':' + port; url += ':' + port;
} }
url += '/' + path; url += path;
UI.rfb = new RFB(document.getElementById('noVNC_container'), url, UI.rfb = new RFB(document.getElementById('noVNC_container'), url,
{ shared: UI.getSetting('shared'), { shared: UI.getSetting('shared'),