Skip to content

Commit

Permalink
fix: invalid OPTIONS request handling (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviortheking authored Jan 3, 2024
1 parent b4dbdef commit 12ed23b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ server.use((req, res, next) => {
next()
})

/**
* Handle options requests
*/
server.options('/*', (_, res) => {
res.status(200).send()
})

server.get('/', (_, res) => {
res.redirect('https://www.tcgdex.dev/?ref=api.tccgdex.net')
})
Expand Down

0 comments on commit 12ed23b

Please sign in to comment.