Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

nhulsch/slim-redis-rlimit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slim Redis Ratelimit

PSR-7 Ratelimiter

Usage

$app = new Slim\App();

$app->add(new \Slim\Middleware\RedisRatelimit('tcp://127.0.0.1:6379', 500, 300));

This will be called on every requests and checks if the number of requests (in this case 500) exceeds within 300 seconds.

Class will also check if the Cloudflare UserIP header is set and will use that for tracking.

About

Ratelimiting using Redis for Slim 3.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages