2017 © Pedro Peláez
 

symfony-bundle zim32-request-limit-bundle

With this bundle you can easy limit requests to your application

image

ghua/zim32-request-limit-bundle

With this bundle you can easy limit requests to your application

  • Monday, November 19, 2012
  • by ghua
  • Repository
  • 1 Watchers
  • 0 Stars
  • 135 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

README

Overview

With this bundle you can easy limit requests to your application, (*1)

Installation

1) Add Zim32RequestLimitBundle to your deps file, (*2)

[Zim32RequestLimitBundle]
    git=git://github.com/zim32/Symfony2-RequestLimitBundle.git
    target=/bundles/Zim32/RequestLimitBundle

Make /bin/vendors install, (*3)

2) Add Zim32RequestLimitBundle to your AppKernel, (*4)

$bundles = array(
    .................
    new Zim32\RequestLimitBundle\Zim32RequestLimitBundle(),
);

3) Add Zim32 namespace into your /app/autoload.php, (*5)

 $loader->registerNamespaces(array(
     ................
     'Zim32'            => __DIR__.'/../vendor/bundles',
 ));

4) Configure your application. For example, (*6)

 zim32_request_limit:
   rules:
     rule:
       path: /profile/
       limit: 1
       per: 60
       ip: 192.168.1.2
     some_foo_name:
       path: /
       limit: 10
       per: 1

First rule will limit requests for 1 request per 60 seconds from ip 192.168.1.2 for URL starting with /profile/, (*7)

Reference

  1. path (required) - path to apply rule
  2. limit (required) - number of requests. For immediate deny use '0' for limit
  3. per (required) - seconds
  4. ip (optional) - limit by remote ip

You can use several rules at the same time, (*8)

The Versions

19/11 2012

dev-master

9999999-dev https://github.com/ghua/Symfony2-RequestLimitBundle

With this bundle you can easy limit requests to your application

  Sources   Download

The Requires

 

by Avatar Zim32

symfony2 bundle request limit