Skip to content

Commit

Permalink
feat: cors 설정을 추가합니다.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero-1016 committed Mar 3, 2025
1 parent 11c5741 commit 0d51adb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backend/auth-server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ app.register(fastifySwaggerUi, {
app.register(currentAuthPlugin);
app.register(routes);

app.register(cors, {
origin: ['http://localhost:5173', 'https://bbebig.netlify.app'],
credentials: true,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization'],
exposedHeaders: ['set-cookie'],
});

app
.register(fastifyRedis, {
client: redis,
Expand Down

0 comments on commit 0d51adb

Please sign in to comment.