Skip to content

Commit

Permalink
potential cors fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush Roy authored and Ayush Roy committed Dec 2, 2023
1 parent 84397a3 commit b75a835
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ app.use(cors({
app.use(express.json())
app.use(cookieParser())

app.options('*', cors());

let environment = process.env.NODE_ENV

if (environment === 'prod') {
Expand Down Expand Up @@ -45,6 +47,6 @@ app.use('/api/transactions', transactionsRouter)
app.use('/api/users', userRouter)
app.use('/api/qrcode', qrCodeRouter)

app.options('*', cors());


export { app }

0 comments on commit b75a835

Please sign in to comment.