NestJS - Middleware
Identify the error in this middleware implementation:
export class AuthMiddleware implements NestMiddleware {
use(req, res, next) {
if (!req.headers.authorization) {
res.status(401).send('Unauthorized');
}
next();
}
}