feat: serve the same CRM on crm.montact.ir as an alias

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-15 23:24:50 +03:30
co-authored by Cursor
parent a494b5308e
commit 9611803567
6 changed files with 69 additions and 11 deletions
+6 -1
View File
@@ -17,8 +17,13 @@ async function bootstrap() {
}),
);
const corsRaw = config.get<string>('CORS_ORIGIN') ?? 'http://localhost:5173';
const corsOrigins = corsRaw
.split(',')
.map((origin) => origin.trim())
.filter(Boolean);
app.enableCors({
origin: config.get<string>('CORS_ORIGIN') ?? 'http://localhost:5173',
origin: corsOrigins.length <= 1 ? (corsOrigins[0] ?? 'http://localhost:5173') : corsOrigins,
credentials: true,
});