Developed with love by KnpLabs Hire us for your project!
235

RateLimitBundle

by jaytaph

Add rate limits to your controllers / actions easily through annotations

No readme file found in bundle.
Copyright (c) 2014 NoxLogic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
noxlogic_rate_limit:
enabled: true

# The storage engine where all the rates will be stored
storage_engine: redis

# The redis client to use for the redis storage engine
redis_client: default_client

# The memcache client to use for the memcache storage engine
memcache_client: default

# The Doctrine Cache provider to use for the doctrine storage engine
doctrine_provider: ~ # Example: my_apc_cache

# The HTTP status code to return when a client hits the rate limit
rate_response_code: 429

# Optional exception class that will be returned when a client hits the rate limit
rate_response_exception: ~

# The HTTP message to return when a client hits the rate limit
rate_response_message: You exceeded the rate limit

# Should the ratelimit headers be automatically added to the response?
display_headers: true

# What are the different header names to add
headers:
limit: X-RateLimit-Limit
remaining: X-RateLimit-Remaining
reset: X-RateLimit-Reset

# Rate limits for paths
path_limits:
path: ~ # Required
methods:

# Default:
- *
limit: ~ # Required
period: ~ # Required
  • Merge pull request #32 from Sharykhin/patch-1
    By web-flow, 1 year ago
  • Merge pull request #55 from odoucet/master
    By web-flow, 1 year ago
  • Merge pull request #37 from PBWebMedia/master
    By web-flow, 1 year ago
  • add Travis builds for Symfony 3.1, 3.2 and 3.3
    By , 1 year ago
  • use composer-provided phpunit binary instead of downloading it again
    By odoucet, 1 year ago
  • fix travis build by bumping phpunit version required
    By odoucet, 1 year ago
  • Updated oauth server bundle version
    By web-flow, 2 years ago
  • Updated phpunit and removed 5.3 from travis
    By web-flow, 2 years ago
  • Removed HHVM from the tests
    By web-flow, 2 years ago
  • Updated travis.yml for newer PHP releases
    By web-flow, 2 years ago
  • Merge pull request #44 from xofym/master
    By web-flow, 2 years ago
  • Fixing issue #42: Do not propagate event further if controller was set
    By laurent35240, 2 years ago
  • refresh rate limit if time is exceeded
    By Frank Koornstra, 2 years ago
  • create services and parameters when not enabled, skip rate limit check when not enabled
    By Frank Koornstra, 2 years ago
  • Update README.md
    By , 3 years ago
  • Merge pull request #30 from s4brown/resetrate
    By jaytaph, 3 years ago
  • Implement reset of rate limit
    By , 3 years ago
  • Merge pull request #28 from hyperunknown/symfony3
    By jaytaph, 3 years ago
  • Initial support for Symfony 3
    By peshi, 3 years ago
  • Merge pull request #23 from sarelvdwalt/patch-1
    By jaytaph, 3 years ago
  • Small typo ;)
    By sarelvdwalt, 3 years ago
  • Update .travis.yml
    By jaytaph, 4 years ago
  • Updated changelog
    By jaytaph, 4 years ago
  • Merge pull request #20 from samvdb/master
    By jaytaph, 4 years ago
  • Add PHPUnit test for urlencoded paths
    By samvdb, 4 years ago
  • Decode URL to prevent rate limit bypassing by using %2F instead of /
    By samvdb, 4 years ago
  • Merge pull request #19 from jmclean/patch-1
    By jaytaph, 4 years ago
  • Fix rate_response_exception
    By jmclean, 4 years ago
  • Merge pull request #18 from joshk/patch-1
    By jaytaph, 4 years ago
  • Use the new build env on Travis
    By joshk, 4 years ago