From 570e97ca870dfb35cb3e747c9ff4ac9725a07498 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 3 Jul 2021 19:06:32 -0400 Subject: [PATCH] more fixes or whateva!! --- src/api/comm.libraryofcode.org/routes/keys.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/api/comm.libraryofcode.org/routes/keys.ts b/src/api/comm.libraryofcode.org/routes/keys.ts index 29244f7..26354a3 100644 --- a/src/api/comm.libraryofcode.org/routes/keys.ts +++ b/src/api/comm.libraryofcode.org/routes/keys.ts @@ -8,17 +8,13 @@ export default class Keys extends Route { }; } - protected pre() { + public bind() { this.router.all('*', (_req, res, next) => { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', '*'); res.setHeader('Access-Control-Allow-Headers', '*'); next(); }); - } - - public bind() { - this.pre(); this.router.get('/x509/:userID', async (req, res) => { const memberDoc = await this.server.client.db.Member.findOne({ userID: req.params.userID }).lean().exec();