about summary refs log tree commit diff
path: root/config/initializers/rack-attack.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/rack-attack.rb')
-rw-r--r--config/initializers/rack-attack.rb4
1 files changed, 3 insertions, 1 deletions
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