Download the PHP package nw/request-limit-bundle without Composer
On this page you can find all versions of the php package nw/request-limit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nw/request-limit-bundle
More information about nw/request-limit-bundle
Files in nw/request-limit-bundle
Package request-limit-bundle
Short Description This bundle provides a light way to restrict user access to some action for a specific time frame
License MIT
Homepage https://github.com/NovikovViktor/RequestLimitBundle
Informations about the package request-limit-bundle
RequestLimitBundle
This bundle is a simple solution to restrict user access to some controller for a specified timeline.
This functionality could be used for different cases when you need to:
- prevent flood - pushing users of irrelevant data;
- prevent a user from accessing the certain endpoint very often, etc.
Installation
1) Install package via:
2) Register bundle :
In app/AppKernel.php
prior to Symfony version 4.0
:
In config/bundles.php
when Symfony version is 4.0
and higher
3) Configure the bundle according to the provider you would like to use. Out of the box, we provide the Memcached and MySQL providers. To see configuration options, see the docs below.
If you want to use other storage, you can implement your provider.
4) Specify restriction_time
in seconds:
Usage
In your action, add the following line to restrict access by some specific application user artifact (e.g., user id, user IP, etc.):
These will restrict user access for a time frame specified in your configuration (5 seconds accordingly to).
All versions of request-limit-bundle with dependencies
ext-memcached Version *
ext-pdo Version *
symfony/symfony Version >=3.0
doctrine/common Version ~2.4