mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
fix(documentation): Updating README with non-deprecated configuration.
This commit is contained in:
parent
933c0576b8
commit
8313e38df3
1 changed files with 2 additions and 2 deletions
|
|
@ -347,8 +347,8 @@ Rack::Attack.throttled_response_retry_after_header = true
|
||||||
Here's an example response that includes conventional `RateLimit-*` headers:
|
Here's an example response that includes conventional `RateLimit-*` headers:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
Rack::Attack.throttled_response = lambda do |env|
|
Rack::Attack.throttled_responder = lambda do |request|
|
||||||
match_data = env['rack.attack.match_data']
|
match_data = request.env['rack.attack.match_data']
|
||||||
now = match_data[:epoch_time]
|
now = match_data[:epoch_time]
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue