From d7f64ccfef5df6abb9bae5ec8baf252e75efc041 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 29 Nov 2022 12:28:11 +0100 Subject: [PATCH] Add heuristic to find core address if UI is proxied --- src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index ea1f7cd..4958457 100644 --- a/src/index.js +++ b/src/index.js @@ -10,6 +10,9 @@ import theme from './theme'; import RestreamerUI from './RestreamerUI'; let address = window.location.protocol + '//' + window.location.host; +if (window.location.pathname.endsWith('/ui/')) { + address += window.location.pathname.replace(/ui\/$/, ''); +} const urlParams = new URLSearchParams(window.location.search.substring(1)); if (urlParams.has('address') === true) {