From 0855f019130276f06134ca09516a2030bc1820d3 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Sat, 14 Jun 2025 13:20:21 -0400 Subject: [PATCH] Update AppRouter.jsx --- web/src/router/AppRouter.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/router/AppRouter.jsx b/web/src/router/AppRouter.jsx index 28908ba..bea56a7 100644 --- a/web/src/router/AppRouter.jsx +++ b/web/src/router/AppRouter.jsx @@ -63,7 +63,7 @@ const AppRouter = () => { const fetchAPI = async () => { const location = window.location; - const uri = `http://localhost:5172/api`; + const uri = `${location?.protocol}//${location?.hostname}:5172/api`; const response = await axios.get(uri); console.log(response.data.fruits); };