Skip to content

A Zend Framework module that helps you to deal with rate limit.

License

Notifications You must be signed in to change notification settings

InMediam/zf-rate-limit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RateLimit

A Zend Framework module that helps you to deal with rate limit.

HOW TO USE

  1. In your composer.json file, add:
    "repositories": [
        {
            "url": "https://github.com/inmediam/zf-rate-limit.git",
            "type": "git"
        }
    ],
  1. In the terminal, run:
composer require inmediam/zf-rate-limit
  1. In your config file (eg. config/autoload/global.php), add:
return [
    // ...
    'rate_limit' => [
        'routes' => ['*'],
        'storage' =>  [
            'adapter' => Zend\Cache\Storage\Adapter\Filesystem::class,
            'options' => [
                'cache_dir' => __DIR__ . '/../../data/cache',
            ],
        ],
        'limit' => 2,
        'period' => 15,
    ]
];

License

RateLimit is licensed under The MIT License (MIT).

About

A Zend Framework module that helps you to deal with rate limit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%