Skip to content

Tags: TylerRick/rack_attack_admin

Tags

v0.1.2

Toggle v0.1.2's commit message
Version 0.1.2

backup/2019-06-17T16-48-00-master

Toggle backup/2019-06-17T16-48-00-master's commit message
.

backup/2019-06-17T15-08-58-master

Toggle backup/2019-06-17T15-08-58-master's commit message
f

backup/2019-06-17T14-09-58-master

Toggle backup/2019-06-17T14-09-58-master's commit message
Make it work when Rack::Attack.cache.store is set to an instance of A…

…ctiveSupport::Cache::RedisCacheStore (from rails)

Before it was only tested with cache.store set to an instance of Redis::Store from redis-store gem.
(Used by ActiveSupport::Cache::RedisStore (from redis-activesupport gem))

Resolves error: undefined method `keys' for #<Rack::Attack::StoreProxy::RedisCacheStoreProxy>

It is still recommended to use Redis::Store though, especially if using a namespace, because its
`keys` method automatically strips out the namespace, whereas when Redis#keys (used by
ActiveSupport::Cache::RedisCacheStore) does not.

backup/2019-06-17T13-49-46-master

Toggle backup/2019-06-17T13-49-46-master's commit message
discard

backup/2019-06-17T13-12-17-master

Toggle backup/2019-06-17T13-12-17-master's commit message
discard: strip namespace

instead, use redis-store

backup/2019-06-17T13-11-04-master

Toggle backup/2019-06-17T13-11-04-master's commit message
discard: strip namespace

instead, use redis-store

backup/2019-06-17T13-00-07-master

Toggle backup/2019-06-17T13-00-07-master's commit message
Include cache store namespace as part of prefix

I don't think the namespace was part of the actual key when you specified a namespace with
ActiveSupport::Cache::RedisStore (from redis-rails), but with ActiveSupport::Cache::RedisCacheStore
(from rails), it very unfortunately is adding the namespace as part of the key, which means we have
to include it when filtering keys or unprefixing key.

v0.1.1

Toggle v0.1.1's commit message
Version 0.1.1

v0.1.0

Toggle v0.1.0's commit message
Version 0.1.0