diff options
author | mat <github@matdoes.dev> | 2022-03-16 23:25:26 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-16 23:25:26 -0500 |
commit | 9b03169b491432fb42097f08cc13c4a4aaaa52b9 (patch) | |
tree | 5813bf3ed07226ca211148c78e65e462437efcba /src | |
parent | 81fc2a3295c3f7f6ab02447be95186ce6c356e23 (diff) | |
download | skyblock-api-9b03169b491432fb42097f08cc13c4a4aaaa52b9.tar.gz skyblock-api-9b03169b491432fb42097f08cc13c4a4aaaa52b9.tar.bz2 skyblock-api-9b03169b491432fb42097f08cc13c4a4aaaa52b9.zip |
cors is cringe
Diffstat (limited to 'src')
-rw-r--r-- | src/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts index fd2b724..3c0b862 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,6 +30,7 @@ app.use(limiter) app.use(express.json()) app.use((req, res, next) => { res.setHeader('Access-Control-Allow-Origin', '*') + res.setHeader('Access-Control-Allow-Headers', '*') next() }) @@ -190,7 +191,7 @@ app.delete('/accounts/session', async (req, res) => { // delete a session try { const { uuid } = req.body - const session = await deleteSession(uuid) + await deleteSession(uuid) res.json({ ok: true }) } catch (err) { console.error(err) |