Skip to content

Commit

Permalink
trying to solve cors error
Browse files Browse the repository at this point in the history
  • Loading branch information
subru-37 committed Jan 14, 2025
1 parent f885e4f commit 03f1e03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/core-admin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ const app: Express = express();

const { auth } = require('express-oauth2-jwt-bearer');

const allowedOrigins = ['https://techno-event-management.vercel.app', 'http://localhost:3000'];

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

Expand Down

0 comments on commit 03f1e03

Please sign in to comment.