Use Bearer token
This commit is contained in:
parent
55e19609e8
commit
303b3cf303
3 changed files with 38 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue