Skip to content

Commit

Permalink
tried to fix cors error 6
Browse files Browse the repository at this point in the history
  • Loading branch information
subru-37 committed Jan 15, 2025
1 parent 44d880d commit 9d8004e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/core-admin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ const allowedOrigins = [

app.use(
cors({
origin: allowedOrigins,
origin: '*',
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
credentials: true, // Allow cookies or authorization headers
allowedHeaders: ['Content-Type', 'Authorization'],
allowedHeaders: '*', // Allow all headers
}),
);

Expand Down

0 comments on commit 9d8004e

Please sign in to comment.