Skip to content

Commit

Permalink
✨ feat: cors 허용
Browse files Browse the repository at this point in the history
  • Loading branch information
asn6878 committed Nov 14, 2024
1 parent 5d4b74d commit 8022e67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import { GlobalExceptionsFilter } from './common/filters/global-exceptions.filte
async function bootstrap() {
const app = await NestFactory.create(AppModule);
setupSwagger(app);

app.setGlobalPrefix('api');
app.useGlobalFilters(new GlobalExceptionsFilter());
app.enableCors({
origin: ['http://localhost:3000', 'https://denamu.netlify.app/'],
credentials: true,
});
await app.listen(process.env.PORT ?? 3000);
}

Expand Down

0 comments on commit 8022e67

Please sign in to comment.