From 8845024f7623ffe89d4f9a14b6aaf5c17796996a Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Wed, 19 Nov 2025 20:50:41 -0500 Subject: [PATCH] removed hardcoded auth url from client --- ui/src/router/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/router/index.js b/ui/src/router/index.js index b688592..84d7189 100644 --- a/ui/src/router/index.js +++ b/ui/src/router/index.js @@ -37,6 +37,9 @@ const router = createRouter({ ] }) +const addr = import.meta.env.VITE_APIHOST; + + router.beforeEach(async (to) => { const user = useUserStore() @@ -49,7 +52,7 @@ router.beforeEach(async (to) => { if (to.meta.requiresAuth && !user.isLoggedIn) { // Redirect back to original page after login const redirectUrl = encodeURIComponent(window.location.origin + to.fullPath) - window.location.href = `https://aj17thdevapi.nexuszone.net/login?redirect=${redirectUrl}` + window.location.href = `${addr}/login?redirect=${redirectUrl}` return false // Prevent Vue Router from continuing }