tag 0.2.6
Update rack version due to vulnerability Update redis version
tag 0.2.5
Update dependencies.
tag 0.2.4
Update dependencies and author info in gemspec.
tag 0.2.3
Update dependencies.
tag 0.2.2
Update dependencies.
tag 0.2.1
- Added auto-expiration of redis throttle keys using the redis command PEXPIRE. A throttle key is automatically cleaned up by redis if no activity is recorded against this key for more than the specified throttle period.
tag 0.2.0
- Added notifications for throttle and ban events. Callbacks are registered with
Config#after_banandConfig#after_throttlemethods.
tag 0.1.1
- Relax rack and redis gem required versions
- Wrap redis connection with a proxy before initializing
ThrottleCounterinstances. This avoids having to do the store initialization (Config#sotre=) -if any- before declaring throttle rules (Config#throttle). For instance, the following configuration is now correct:
Rack::Defense.setup do |config|
config.throttle('name', 100, 1000) { |req| req.ip if req.path='/path' }
# no need to set the store before the throttle rule. it can be done at any moment in config section
config.store = 'redis://server:3333/0'
endtag 0.1.0
- Throttle requests using a sliding window with period/max_request and request criteria.
- Ban (block) requests matching criteria.
Rack::Defense#setupto configure redis store and throttled and banned responses