mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Make throttling_spec work when running it with rails 4.2
This commit is contained in:
parent
08b2cc4d95
commit
0ff1b5be83
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ describe "#throttle" do
|
|||
# Could be used to have different rate limits for authorized
|
||||
# vs general requests
|
||||
limit_proc = lambda do |request|
|
||||
if request.get_header("X-APIKey") == "private-secret"
|
||||
if request.env["X-APIKey"] == "private-secret"
|
||||
2
|
||||
else
|
||||
1
|
||||
|
|
@ -67,7 +67,7 @@ describe "#throttle" do
|
|||
# Could be used to have different rate limits for authorized
|
||||
# vs general requests
|
||||
period_proc = lambda do |request|
|
||||
if request.get_header("X-APIKey") == "private-secret"
|
||||
if request.env["X-APIKey"] == "private-secret"
|
||||
10
|
||||
else
|
||||
30
|
||||
|
|
|
|||
Loading…
Reference in a new issue