koa-maxrequests

1.0.0 • Public • Published

maxrequests

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Limit max requests on each http keepalive connection.

Install

$ npm install koa-maxrequests

Usage

const maxrequests = require('koa-maxrequests');
const koa = require('koa');
 
const app = koa();
app.use(maxrequests({
  // if keepalive socket hit max requests, response will set `Connection: close` header.
  max: 1000,
}));

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i koa-maxrequests

Weekly Downloads

105

Version

1.0.0

License

MIT

Last publish

Collaborators

  • fengmk2