diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/database.yml | 2 | ||||
-rw-r--r-- | config/initializers/rack-attack.rb | 4 | ||||
-rw-r--r-- | config/routes.rb | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/config/database.yml b/config/database.yml index 259244e6f..de67804d2 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,6 +1,6 @@ default: &default adapter: postgresql - pool: 5 + pool: 25 timeout: 5000 encoding: unicode diff --git a/config/initializers/rack-attack.rb b/config/initializers/rack-attack.rb index fc2b56c87..15fc6b351 100644 --- a/config/initializers/rack-attack.rb +++ b/config/initializers/rack-attack.rb @@ -1,3 +1,5 @@ class Rack::Attack - # TODO + throttle('req/ip', limit: 300, period: 5.minutes) do |req| + req.ip + end end diff --git a/config/routes.rb b/config/routes.rb index 0dde9f111..e9e662ed0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,7 @@ require 'sidekiq/web' Rails.application.routes.draw do - authenticate :user do + authenticate :user, lambda { |u| u.admin? } do mount Sidekiq::Web => '/sidekiq' end |