Commit 373bbda2 authored by shahriar's avatar shahriar
Browse files

Update main.ts

parent 1cbb0837
...@@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'; ...@@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module'; import { AppModule } from './app.module';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule,{ cors: true });
app.enableCors({ app.enableCors({
origin: '*', origin: '*',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment