From 367f82e7bfcdd78b8f6f269ce1050cfa0ba5e3af Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Sat, 14 Jun 2025 13:28:29 -0400 Subject: [PATCH] add origin and AppRouter --- api/server.js | 6 +++++- web/src/router/AppRouter.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/server.js b/api/server.js index a46912d..fda9b50 100644 --- a/api/server.js +++ b/api/server.js @@ -7,7 +7,11 @@ import { postgresServices } from './services/postgres/postgresServices.js'; const app = express(); const corsOptions = { - origin: ["http://localhost:5173"] + origin: [ + "http://localhost:5173", + "https://shift-dev.code-catalyst.com", + "https://shift.code-catalyst.com" + ] }; app.use(cors(corsOptions)); diff --git a/web/src/router/AppRouter.jsx b/web/src/router/AppRouter.jsx index 58fc06c..89135a9 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 = `192.168.0.105:5172/api`; + const uri = `/api`; const response = await axios.get(uri); console.log(response.data.fruits); };