From 01692ec3a57fb7be983659f59c5e6d84234be403 Mon Sep 17 00:00:00 2001 From: Vladislav Zaynchkovsky Date: Thu, 7 Jun 2018 15:12:48 +0300 Subject: [PATCH] update regex to cover more cases --- app/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);