Skip to content

Commit

Permalink
πŸ”§ fix: CORS μ—λŸ¬ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuo3o committed Nov 7, 2024
1 parent 68eac63 commit c34f56e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions BE/src/main.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,13 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
setupSwagger(app);

app.enableCors({
origin: ['http://localhost:5173', 'http://223.130.151.42:3000'],
methods: 'GET, HEAD, PUT, PATH, POST, DELETE',
preflightContinue: false,
optionsSuccessStatus: 204,
});

await app.listen(process.env.PORT ?? 3000);
}

0 comments on commit c34f56e

Please sign in to comment.