diff --git a/web/src/router/AppRouter.jsx b/web/src/router/AppRouter.jsx index e77714b..d5dfcb5 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 = `${location?.protocol}//192.168.0.105:5172/api`; + const uri = `${location?.protocol}//${location.hostname}/api`; const response = await axios.get(uri); console.log(response.data.fruits); };