1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-04-22 19:02:10 +00:00

fix: invalid OPTIONS request handling (#467)

This commit is contained in:
Florian Bouillon 2024-01-03 20:25:15 +01:00 committed by GitHub
parent b4dbdef4fa
commit 12ed23b5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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')
})