feat: serve the same CRM on crm.montact.ir as an alias
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user