From a953e63dd8ddd00a56eb83d3bd929ac033113046 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Sun, 16 Nov 2025 20:42:32 +0000 Subject: [PATCH] Fix CORS to allow both port 5173 and 5174 --- server/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/index.ts b/server/src/index.ts index 7e08548..bab3501 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -18,7 +18,11 @@ app.use(helmet({ contentSecurityPolicy: false, // Disable CSP for development })); app.use(cors({ - origin: process.env.CORS_ORIGIN || 'http://localhost:5173', + origin: [ + 'http://localhost:5173', + 'http://localhost:5174', + process.env.CORS_ORIGIN || '' + ].filter(Boolean), credentials: true, })); app.use(express.json());