aporat / rate-limiter-middleware
This package is abandoned and no longer maintained.
The author suggests using the aporat/laravel-rate-limiter package instead.
PHP Rate Limiter Middleware
dev-master
2016-01-11 21:42 UTC
Requires
- php: >=5.5
- predis/predis: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- phpunit/phpunit: ^4.0
- slim/slim: ~3
- squizlabs/php_codesniffer: ^2.5
This package is auto-updated.
Last update: 2020-08-24 03:59:19 UTC
README
Installation
It's recommended that you use Composer to install this package.
$ composer require aporat/rate-limiter-middleware
This will install the package and all required dependencies.
Usage
Include the default middleware. By default, requests are rate limited per hour, minute and second.
<?php use RateLimiter\Middleware as RateLimiterMiddleware; $redis_settings = [ 'host' => '127.0.0.1', 'port' => '6379' ]; $middlware = new RateLimiterMiddleware([], $redis_settings); $app->add($middlware);