Skip to content

Commit

Permalink
enable cors.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zklink committed Jul 15, 2024
1 parent cbe42a4 commit e8e2659
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule, {
logger,
});
app.enableCors({
origin: "*",
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
allowedHeaders: "Content-Type,Authorization",
credentials: true,
});

const configService = app.get(ConfigService);

Expand Down

0 comments on commit e8e2659

Please sign in to comment.