Merge pull request 'rc' (#11) from rc into main
commit
7802808f62
|
|
@ -3,15 +3,11 @@ import { AppModule } from './app.module';
|
||||||
|
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule, { cors: false });
|
||||||
|
|
||||||
//настройка CORS
|
//настройка CORS
|
||||||
|
|
||||||
app.enableCors({
|
|
||||||
origin: '*',
|
|
||||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
|
|
||||||
allowedHeaders: 'Content-Type, Authorization',
|
|
||||||
});
|
|
||||||
await app.listen(process.env.PORT ?? 3000);
|
await app.listen(process.env.PORT ?? 3000);
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
Loading…
Reference in New Issue