bedrock-request-limiter
A bedrock module that adds HTTP(S) request limiting to bedrock-express to, for example, help mitigate DoS attacks.
bedrock-request-limiter is built using redback.
Requirements
- npm v3+
Quick Examples
npm install bedrock-request-limiter
Request limiting is controlled via the configuration system; simply include bedrock-request-limiter and set the maximum number of requests per IP per hour to allow.
var bedrock = ; ;;; // limit number of requests per hour per IP address (0 means no limit)bedrockconfiglimiteripRequestsPerHour = 3600; bedrockstart;
Configuration
For more documentation on configuration, such as where to set your Redis host, port, and password information, see config.js.