|
|
@ -1,8 +1,10 @@ |
|
|
|
|
|
|
|
require "paas_configuration_service" |
|
|
|
|
|
|
|
|
|
|
|
if Rails.env.development? || Rails.env.test? |
|
|
|
if Rails.env.development? || Rails.env.test? |
|
|
|
Rack::Attack.cache.store = ActiveSupport::Cache::MemoryStore.new |
|
|
|
Rack::Attack.cache.store = ActiveSupport::Cache::MemoryStore.new |
|
|
|
Rack::Attack.enabled = false |
|
|
|
Rack::Attack.enabled = false |
|
|
|
else |
|
|
|
else |
|
|
|
redis_url = PaasConfigurationService.new.redis_uris[:"dluhc-core-#{Redis.env}-redis-rate-limit"] |
|
|
|
redis_url = PaasConfigurationService.new.redis_uris[:"dluhc-core-#{Rails.env}-redis-rate-limit"] |
|
|
|
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: redis_url) |
|
|
|
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: redis_url) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|