From 12ed23b5a2796b5e0a35e36ee88d897dc34ba07b Mon Sep 17 00:00:00 2001 From: Avior Date: Wed, 3 Jan 2024 20:25:15 +0100 Subject: [PATCH] fix: invalid `OPTIONS` request handling (#467) --- server/src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/src/index.ts b/server/src/index.ts index cb3c0e187..9c20db665 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -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') })