Socket
Socket
Sign inDemoInstall

count-request-size-middleware

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    count-request-size-middleware

Count the request size of each [express](https://github.com/visionmedia/express) request.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
16.3 kB
Created
Weekly downloads
 

Readme

Source

count-request-size-middleware

Count the request size of each express request.

Example

var countRequestSize = require('count-request-size-middleware');

var app = express();
app.use(countRequestSize());

app.use(function (req, res, next) {
  console.log('Received ' + req._received + ' bytes');
  next();
});

API

countRequestSize(options)

Generate a count request size middleware with options defaulting to:

{
    key: '_received' // save the size as `_received`
}

License

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|

FAQs

Last updated on 22 Dec 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc