mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +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
|
# 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.
|
# the counter. After that we continue using the original RedisCacheStore#increment.
|
||||||
if options[:expires_in] && !read(name)
|
if options[:expires_in] && !read(name)
|
||||||
write(name, 1, options)
|
write(name, amount, options)
|
||||||
|
|
||||||
1
|
1
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue