NestJS 11 · Validation, guards and interceptors

Enable CORS

Allow browser apps on other origins to call the API.

const app = await NestFactory.create(AppModule);
app.enableCors({ origin: 'https://app.example.com' });

Official NestJS 11 documentation

More validation, guards and interceptors commands

All validation, guards and interceptors commands · NestJS 11 cheatsheet

Was this page helpful?