From 685783f6a42339a7bcd1bf0eea49572d0683b1ea Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Wed, 26 Dec 2018 21:03:41 -0500 Subject: [PATCH] Remove hard coded value --- app/routes/api/auth.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/routes/api/auth.js b/app/routes/api/auth.js index 626bac4..ca0a611 100644 --- a/app/routes/api/auth.js +++ b/app/routes/api/auth.js @@ -101,8 +101,9 @@ router.post('/register', console.log(config.get('RateLimit')); const loginLimiter = config.get('RateLimit.enable') ? rateLimit({ - windowMs: 60 * 60 * 1000,//config.get('RateLimit.login.window') * 1000, - max: 5,//config.get('RateLimit.login.max'), + windowMs: config.get('RateLimit.login.window') * 1000, + max: config.get('RateLimit.login.max'), + skipSuccessfulRequests: true }) : (req, res, next) => { next(); }; const loginProps = [