@@ -1,5 +1,7 @@
|
||||
/**
|
||||
* Checks if the event secret is correct
|
||||
* It adds the following properties to the request object:
|
||||
* - req.isEventAuthorized - Returns true if the event secret is correct
|
||||
* @param req
|
||||
* @param res
|
||||
* @param next
|
||||
@@ -9,6 +11,7 @@ function eventAuthorizationMiddleware(req, res, next) {
|
||||
return res.status(401).send("Unauthorized");
|
||||
}
|
||||
|
||||
req.isEventAuthorized = true;
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user