Use Bearer token

This commit is contained in:
oitsjustjose 2022-04-15 08:59:32 -05:00
commit 303b3cf303
3 changed files with 38 additions and 3 deletions

View file

@ -7,7 +7,8 @@ import { LOGGER } from "../util/Logger";
export default () => {
return async (req: Request, res: Response, next: NextFunction) => {
try {
const token = req.header("auth-token");
const token = req.header("authorization").replace("Bearer ", "");
if (!token) {
return next();
}