limiting-middleware

1.3.2 • Public • Published

Limiting-middleware

This module enforces limits based on IPs for you express APIs. So far, the usage is for my personal projects. But if there is interest, I could prioritize development for new features:

  • Better instantiation (pass in limits through a time-based DSL)
  • Improved logging
  • And more

Import the module

npm i limiting-middleware --save

Usage

const LimitingMiddleware = require('limiting-middleware');
app.use(new LimitingMiddleware({ limit: 100, resetInterval: 1200000 }).limitByIp());
// 100 request limit. 1200000ms reset interval (20m).

Readme

Keywords

none

Package Sidebar

Install

npm i limiting-middleware

Weekly Downloads

12

Version

1.3.2

License

ISC

Unpacked Size

2.96 kB

Total Files

3

Last publish

Collaborators

  • 15dkatz