Fix CORS and linting in app.ts for stable deploy

This commit is contained in:
2026-08-27 14:44:32 +00:00
parent f8cda3d219
commit 32632c1c35
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ app.use(cors({
}
},
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization', 'x-organization-id']
allowedHeaders: ['Content-Type', 'Authorization', 'x-organization-id', 'x-organization-name']
}));
app.use(express.json({ limit: '5mb' }));
@@ -111,7 +111,7 @@ app.use((req, res, next) => {
});
// Error handler
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
app.use((err: Error, req: express.Request, res: express.Response, _next: express.NextFunction) => {
console.error('Express Error:', err);
if (err.message === 'Not allowed by CORS') {
return res.status(403).json({ error: 'CORS error' });