diff --git a/app/ui.js b/app/ui.js index 70131788..6817cd3c 100644 --- a/app/ui.js +++ b/app/ui.js @@ -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);