diff --git a/.env.example b/.env.example index 04d5ac3..89e825e 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ AUTHORIZATION="Bearer xvz1evFS4wEEPTGEFPHBog" +JAMBO_AUTHORIZATION="Bearer jmb1evFS4wEEPTGEFPHBog" RPC_URL="https://devnet.ixo.earth/rpc/" MNEMONIC="seven panther slogan boy midnight foam rib scale aim spare click grace" PORT=3000 diff --git a/src/auth.middleware.ts b/src/auth.middleware.ts index 34c996a..0fb782a 100644 --- a/src/auth.middleware.ts +++ b/src/auth.middleware.ts @@ -1,7 +1,10 @@ import { Request, Response, NextFunction } from 'express'; export function authorization(req: Request, res: Response, next: NextFunction) { - if (req.get('Authorization') !== process.env.AUTHORIZATION) { + if ( + req.get('Authorization') !== process.env.AUTHORIZATION && + req.get('Authorization') !== process.env.JAMBO_AUTHORIZATION + ) { res.send('Authorization Failed'); return; }