bedrock-request-limiter

2.0.1 • Public • Published

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 = require('bedrock');
 
require('bedrock-server');
require('bedrock-express');
require('bedrock-request-limiter');
 
// limit number of requests per hour per IP address (0 means no limit)
bedrock.config.limiter.ipRequestsPerHour = 3600;
 
bedrock.start();

Configuration

For more documentation on configuration, such as where to set your Redis host, port, and password information, see config.js.

Readme

Keywords

Package Sidebar

Install

npm i bedrock-request-limiter

Weekly Downloads

6

Version

2.0.1

License

none

Last publish

Collaborators

  • davidlehn
  • dlongley
  • mattcollier
  • msporny