Enable CORS with default settings
This commit is contained in:
parent
89fc5d680d
commit
99c88d2800
@ -6,6 +6,7 @@ import { ConfigService } from '@nestjs/config';
|
|||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
app.enableCors(); //Enable CORS with default settings
|
||||||
app.useGlobalPipes(
|
app.useGlobalPipes(
|
||||||
new ValidationPipe({
|
new ValidationPipe({
|
||||||
whitelist:true, // strips unknown properties from @Body()
|
whitelist:true, // strips unknown properties from @Body()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user