New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@twentyfourg-express-sdk/rate-limit

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twentyfourg-express-sdk/rate-limit

[![Version](https://flat.badgen.net/npm/v/@twentyfourg-express-sdk/rate-limit)](https://github.com/twentyfourg/express-sdk/releases) [![Installs](https://flat.badgen.net/npm/dt/@twentyfourg-express-sdk/rate-limit)](https://www.npmjs.com/package/@twentyfou

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

@twentyfourg-express-sdk/rate-limit

Version Installs

Rate limiting middleware.

router.post(
  '/auth',
  rateLimit({ max: 10, minutes: 1, keys: ['ip', 'body.email'] }),
  validator.auth,
  userController.auth
);
OptionsDescriptionDefault
minutesTime frame in minutes for which requests are checked/remembered.1
maxThe maximum number of connections to allow during the window before rate limiting the client.15
standardHeadersWhether to enable support for headers conforming to the ratelimit standardization draft.true
messageThe response body to send back when a client is rate limited.{ error: 'too many requests, please try again later' }
keysWhich properties from the Express Request object to use in the rate limit composite key['ip', 'headers["user-agent"]']
whiteListList of IP addresses to whitelistSDK_EXPRESS_WHITE_LIST environment variable

Environment Variables

VariableDescriptionDefault
SDK_EXPRESS_WHITE_LISTString of IP addresses separated by commas to whitelist[]
EXPRESS_SDK_RATE_LIMIT_DISABLEDWhether to disable rate limiting all together. Helpful for testing/dev environments.false

FAQs

Package last updated on 24 Mar 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc