Compare commits

..

No commits in common. "7802808f62914e7b429735d97b26cde2d0f45c7d" and "d66279885be012846b1ad489451b8e817686135d" have entirely different histories.

1 changed files with 6 additions and 2 deletions

View File

@ -3,11 +3,15 @@ import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule, { cors: false });
const app = await NestFactory.create(AppModule);
//настройка CORS
app.enableCors({
origin: '*',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
allowedHeaders: 'Content-Type, Authorization',
});
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();