cors 간단해결

app.enableCors() 코드 추가

const app = await NestFactory.create(AppModule);
app.enableCors();
await app.listen(3000);

NestFactory.create() 메소드에 cors:true 옵션 추가

const app = await NestFactory.create(AppModule, { cors: true });
await app.listen(3000);

개발단계에서만 추천, 운영에서는 전문가 도움을 받으셈

Subscribe to X세대 신입사원

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe
774-86-01972 cinnabar.3d@gmail.com