Skip to content

A middleware package to track and store IP addresses in Redis and MySQL.

License

Notifications You must be signed in to change notification settings

BrenPop/LaravelIpRateLimiter

Repository files navigation

A middleware package to track and store IP addresses in cache and MySQL.

Installation

You can install the package via composer:

composer require twothreebird/laravelipratelimiter

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravelipratelimiter-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="laravelipratelimiter-config"

This is the contents of the published config file:

return [
    'max_attempts' => 20,
    'ttl_minutes' => 1440, // 24 hours
    'whitelist_routes' => [],
    'whitelist_ips' => []
];

License

The MIT License (MIT). Please see License File for more information.

About

A middleware package to track and store IP addresses in Redis and MySQL.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages