Archived
How to handle Cross-Origin Resource Sharing (CORS) with NestJS?
0
Community Evaluations
Alwyn
26/01/2024
Bonjour, `const app = await NestFactory.create(AppModule, { cors: { origin: 'url_d_origine' } });` est une notation valide, pourquoi la réponse est elle considérée comme fausse ?
On peut soit mettre true/false, soit passer une configuration de CORS
Cf https://docs.nestjs.com/security/cors & https://github.com/expressjs/cors#configuration-options
Similar QuestionsMore questions about Nest
8
How to declare a class as a controller in Nest.js6
What is the main responsibility of a pipe in Nest.js?5
How to make an `ExceptionFilter` global so that it applies to your entire application in NestJS3
Which decorator is used to associate a Guard with a route or controller in Nest?3
How to define a service or component that can be injected in Nest.js