Ajout d'en-tête CORS navigateur
This commit is contained in:
parent
62559810b0
commit
4be37ac303
@ -4,7 +4,7 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
|||||||
import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common'
|
import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common'
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule)
|
const app = await NestFactory.create(AppModule, { cors: true })
|
||||||
|
|
||||||
app.useGlobalPipes(new ValidationPipe({ transform: true }))
|
app.useGlobalPipes(new ValidationPipe({ transform: true }))
|
||||||
app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)))
|
app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)))
|
||||||
|
Loading…
Reference in New Issue
Block a user