Compare commits
No commits in common. "7802808f62914e7b429735d97b26cde2d0f45c7d" and "d66279885be012846b1ad489451b8e817686135d" have entirely different histories.
7802808f62
...
d66279885b
|
|
@ -3,11 +3,15 @@ import { AppModule } from './app.module';
|
||||||
|
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule, { cors: false });
|
const app = await NestFactory.create(AppModule);
|
||||||
|
|
||||||
//настройка 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