123
This commit is contained in:
@ -12,14 +12,14 @@ async function bootstrap() {
|
||||
// Security
|
||||
app.use(helmet());
|
||||
|
||||
// CORS (веб на порту 3125)
|
||||
// CORS (веб часто на 3000)
|
||||
const allowedOrigins = [
|
||||
configService.get('NEXT_PUBLIC_APP_URL'),
|
||||
'http://localhost:3125',
|
||||
'http://localhost:3000',
|
||||
'http://localhost:3125',
|
||||
].filter(Boolean) as string[];
|
||||
app.enableCors({
|
||||
origin: allowedOrigins.length ? allowedOrigins : 'http://localhost:3125',
|
||||
origin: allowedOrigins.length ? allowedOrigins : 'http://localhost:3000',
|
||||
credentials: true,
|
||||
});
|
||||
|
||||
@ -50,7 +50,7 @@ async function bootstrap() {
|
||||
SwaggerModule.setup('docs', app, document);
|
||||
}
|
||||
|
||||
const port = configService.get('PORT') || 3001;
|
||||
const port = configService.get('PORT') || 3125;
|
||||
await app.listen(port);
|
||||
|
||||
console.log(`🚀 API is running on: http://localhost:${port}/api`);
|
||||
|
||||
Reference in New Issue
Block a user