From fbc02839cf4d117c03e1766c2d649eac629c136a Mon Sep 17 00:00:00 2001 From: BEW111 Date: Sun, 18 Aug 2024 16:05:53 -0400 Subject: [PATCH] add localhost to cors --- server/src/config/createExpressApp.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/config/createExpressApp.ts b/server/src/config/createExpressApp.ts index b1c5b065..24bb407d 100644 --- a/server/src/config/createExpressApp.ts +++ b/server/src/config/createExpressApp.ts @@ -40,8 +40,8 @@ const createExpressApp = (sessionStore: MongoStore): express.Express => { // app.use(cors({ credentials: true, origin: FRONTEND_URL })); app.use( cors({ - origin: '*', - credentials: false, + origin: [FRONTEND_URL, 'http://localhost:3000'], + credentials: true, }), ); // Gives express the ability to parse client cookies and add them to req.cookies