Updated comment for globalBlock spam prevention (#10342)

no-issue

Just made it more clear it's not global across the entire api.
This commit is contained in:
Fabien O'Carroll 2019-01-07 20:21:26 +07:00 committed by GitHub
parent 5cecf0cd61
commit d5bf6dc1c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,9 +40,9 @@ const handleStoreError = (err) => {
err.next(customError);
};
// This is a global endpoint protection mechanism that will lock an endpoint if there are so many
// requests from a single IP
// We allow for a generous number of requests here to prevent communites on the same IP bing barred on account of a single suer
// This locks a single endpoint based on excessive requests from an IP.
// Currently only used for auth type methods.
// We allow for a generous number of requests here to prevent communites on the same IP bing barred on account of a single user
// Defaults to 50 attempts per hour and locks the endpoint for an hour
const globalBlock = () => {
const ExpressBrute = require('express-brute');