feat: Rate limiter on requests and login attempts.

This commit is contained in:
a.bouhuolia
2020-12-15 20:25:23 +02:00
parent 27483495cb
commit 6dd1229412
11 changed files with 170 additions and 4 deletions

View File

@@ -122,4 +122,27 @@ export default {
user: process.env.LICENSES_AUTH_USER,
password: process.env.LICENSES_AUTH_PASSWORD,
},
/**
* Redis storage configuration.
*/
redis: {
port: 6379,
},
/**
* Throttler configuration.
*/
throttler: {
login: {
points: 5,
duration: 60 * 60 * 24 * 1, // Store number for 90 days since first fail
blockDuration: 60 * 15,
},
requests: {
points: 30,
duration: 60,
blockDuration: 60 * 10,
}
}
};