diff --git a/src/api/authentication.ts b/src/api/authentication.ts index bbbd32cd..822f10b4 100644 --- a/src/api/authentication.ts +++ b/src/api/authentication.ts @@ -4,7 +4,7 @@ import { getConfig } from '../config/config'; import { uint8ArrayToHex } from '../utils/utils'; const authenticateKey = (req: Request, res: Response, next: NextFunction) => { - const api_key: string = req.header('API_KEY')!; + const api_key: string = req.header('Api-Key')!; if ( api_key && uint8ArrayToHex(blake2b(api_key, undefined, 32)) == @@ -12,7 +12,7 @@ const authenticateKey = (req: Request, res: Response, next: NextFunction) => { ) { next(); } else { - res.status(403).send({ message: "API_KEY doesn't exist or it is wrong" }); + res.status(403).send({ message: "Api-Key doesn't exist or it is wrong" }); } };