mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Honor amount argument instead of hard coding counter
This commit is contained in:
parent
3af7394b6a
commit
ca2e752937
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ module Rack
|
|||
# So in order to workaround this we use RedisCacheStore#write (which sets expiration) to initialize
|
||||
# the counter. After that we continue using the original RedisCacheStore#increment.
|
||||
if options[:expires_in] && !read(name)
|
||||
write(name, 1, options)
|
||||
write(name, amount, options)
|
||||
|
||||
1
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue