From 3484cad50204f44d3f0a4d5949aecfcf712a92e6 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Wed, 10 Jan 2024 13:09:57 -0500 Subject: [PATCH] WIP fetchwrapper logging --- app/frontend/src/_helpers/fetchWrapper.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/frontend/src/_helpers/fetchWrapper.js b/app/frontend/src/_helpers/fetchWrapper.js index 6f725532..7e80bd97 100644 --- a/app/frontend/src/_helpers/fetchWrapper.js +++ b/app/frontend/src/_helpers/fetchWrapper.js @@ -29,7 +29,11 @@ function authHeader(url) { const authStore = useAuthStore(); const jwt = authStore.getToken() const isLoggedIn = !!jwt; + // TODO: const isApiUrl = url.startsWith(import.meta.env.VITE_APP_API_URL); + alert(isLoggedIn) + console.log("isapi", isApiUrl) + console.log("isloggedin", isLoggedIn) if (isLoggedIn && isApiUrl) { return { Authorization: `Bearer ${jwt}` }; } else {