Skip to content

Limit max requests on each http keepalive connection.

License

Notifications You must be signed in to change notification settings

koajs/maxrequests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Limit max requests on each http keepalive connection.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published