Fix CORS to allow both port 5173 and 5174
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user