From bc8b78a8341e74949ad2492396a3ddec80c7dc76 Mon Sep 17 00:00:00 2001 From: Jozef Mrazek Date: Wed, 24 Apr 2024 14:03:04 +0200 Subject: [PATCH] Provide option for seconday url --- src/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index f28b7e5a..69ed57d2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -36,10 +36,16 @@ const App = () => { // Prevent using incompatible environment and deployment const pncUrl = webConfigService.getPncUrl(); + console.log(pncUrl); + console.log(window.location.origin); + console.log(process.env.REACT_APP_WEB_UI_URL); + console.log(process.env.REACT_APP_WEB_SECONDARY_UI_URL); + console.log(window.location.hostname); if ( // https://example.com !pncUrl.startsWith(window.location.origin) && - process.env.REACT_APP_WEB_UI_URL !== window.location.origin && + (process.env.REACT_APP_WEB_UI_URL !== window.location.origin || + process.env.REACT_APP_WEB_SECONDARY_UI_URL !== window.location.origin) && // example.com window.location.hostname !== 'localhost' ) {