added artificial delay on reset route so that the heat death of the universe will arrive before you manage to identify a valid reset code

This commit is contained in:
Julian Lam
2017-08-16 12:51:02 -04:00
parent 12e50b9ae2
commit 6ec1bfd660
2 changed files with 6 additions and 1 deletions

View File

@@ -181,3 +181,8 @@ middleware.processTimeagoLocales = function (req, res, next) {
},
], next);
};
middleware.delayLoading = function (req, res, next) {
// Introduces an artificial delay during load so that brute force attacks are effectively mitigated
setTimeout(next, 1000);
};