shelf_rate_limiter

Last updated:

0 purchases

shelf_rate_limiter Image
shelf_rate_limiter Images
Add to Cart

Description:

shelf rate limiter

Shelf Rate Limiter #
It limits the number of requests made to your backend in a fixed time frame.
Usage #
final memoryStorage = MemStorage();
final rateLimiter = ShelfRateLimiter(
storage: memoryStorage, duration: Duration(seconds: 60), maxRequests: 10);
copied to clipboard
The default values for duration is 60 seconds and maxRequests is 5.
Add it as a middleware inside the handler or any route.
var handler = const Pipeline()
.addMiddleware(logRequests())
.addMiddleware(rateLimiter.rateLimiter())
.addHandler(_echoRequest);

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.