{"repo":"nestjs/throttler","free":true,"listed":false,"github":"https://github.com/nestjs/throttler","clone":"git clone https://github.com/nestjs/throttler.git","description":"A rate limiting module for NestJS to work with Fastify, Express, GQL, Websockets, and RPC 🧭","language":"TypeScript","stars":698,"topics":["nestjs-throttler","nest","nestjs","nodejs","typescript","javascript","rate-limiter"],"license":"MIT","category":"dev-tools","readme_excerpt":"A progressive Node.js framework for building efficient and scalable server-side applications. Description A Rate-Limiter for NestJS, regardless of the context. Throttler ensures that users can only make limit requests per ttl to each endpoint. By default, users are identified by their IP address. This behavior can be customized by providing your own getTracker function. See Proxies for an example where this is useful. Throttler comes with a built-in in-memory cache to keep track of the requests. It supports alternate storage providers. For an overview, see Community Storage Providers. Installation Versions @nestjs/throttler@^1 is compatible with Nest v7 while @nestjs/throttler@^2 is compatible with Nest v7 and Nest v8, but it is suggested to be used with only v8 in case of breaking changes against v7 that are unseen. For NestJS v10, please use version 4.1.0 or above. Usage ThrottlerModule Once the installation is complete, the ThrottlerModule can be configured as any other Nest package with forRoot or forRootAsync methods. The above will set the global options for the ttl , the time to live in milliseconds, and the limit , the maximum number of requests within the ttl, for the routes of your application that are guarded. Once the module has been imported, you can then choose how you would like to bind the ThrottlerGuard . Any kind of binding as mentioned in the guards section is fine. If you wanted to bind the guard globally, for example, you could do so by adding this provid","default_branch":null,"files":null,"tree":[],"storefront":"/r/nestjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nestjs/throttler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}