From ca2e75293780d150f9bd6ab79a6c381b2640f20d Mon Sep 17 00:00:00 2001 From: Gonzalo Rodriguez Date: Wed, 20 Jun 2018 19:14:02 -0300 Subject: [PATCH] Honor amount argument instead of hard coding counter --- lib/rack/attack/store_proxy/redis_cache_store_proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb b/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb index 2b506f3..f14e678 100644 --- a/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb +++ b/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb @@ -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