delay-req

Delay each http request in expressjs, as a part of security implementation

Usage no npm install needed!

<script type="module">
  import delayReq from 'https://cdn.skypack.dev/delay-req';
</script>

README

delay-req

Nodejs lib to delay each http request in expressjs

Installation

npm i delay-req -S

Usage

Please refer to examples

Function

timeout(options)

options
      delay - specifies the amount of the delay to be applied for each request
      maxPendingReq - specifies the maximum number of pending requests that are allowed before sending error response
      errStatus - status code to be sent in case the maximum number of pending request limit has been crossed
      errMsg - error message to sent along with error status code

License

MIT