From 4be37ac3032d8cbc44bdc1acecdb539a15d9a76d Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 9 Dec 2024 22:49:31 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'en-t=C3=AAte=20CORS=20navigateur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main.ts b/server/src/main.ts index acabe9f..fc82f61 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -4,7 +4,7 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger' import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common' async function bootstrap() { - const app = await NestFactory.create(AppModule) + const app = await NestFactory.create(AppModule, { cors: true }) app.useGlobalPipes(new ValidationPipe({ transform: true })) app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)))