update regex to cover more cases

This commit is contained in:
Vladislav Zaynchkovsky 2018-06-07 15:12:48 +03:00
parent 5f5fe8e2f1
commit 01692ec3a5
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ const UI = {
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
let socketUrl = (window.location.pathname || '').replace(/\/[\w\.]+$/, '/websockify');
let socketUrl = (window.location.pathname || '/').replace(/\/([^/]+)?$/, '/websockify');
UI.initSetting('path', socketUrl || '/websockify');
UI.initSetting('repeaterID', '');
UI.initSetting('reconnect', false);