Finished unit tests for new rateLimitByResource()

This commit is contained in:
Chris Troutner
2020-02-10 09:08:17 -08:00
parent a0d1f55894
commit 6a7904b6af
2 changed files with 77 additions and 3 deletions
+2
View File
@@ -206,6 +206,7 @@ class RateLimits {
// uses its output to adjust rate limits on-the-fly based on the users
// permission level.
// CT 2/7/20: I believe this is older code that is only used by routeRateLimit.
// It will probably be removed in the future.
evalUserPermissioins(req, authData) {
// console.log(`authData: ${JSON.stringify(authData, null, 2)}`)
@@ -259,6 +260,7 @@ class RateLimits {
}
}
// Decode the JWT token if one exists.
if (req.locals.jwtToken) {
// Hexadecimal
const publicKey =