summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2013-11-21 16:04:23 +0100
committerMarin Jankovski <marin@gitlab.com>2013-11-21 16:04:23 +0100
commitbb71c5d89f8bfd8a8047bf7056ad4b518c87ac64 (patch)
treebbd7787a786764b67e11d10c689e7714ce89a6c8 /config
parent4525fc840547358a270671ff107c3e4967679442 (diff)
downloadgitlab-ce-bb71c5d89f8bfd8a8047bf7056ad4b518c87ac64.tar.gz
No limits when testing.
Diffstat (limited to 'config')
-rw-r--r--config/initializers/rack_attack.rb.example7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/initializers/rack_attack.rb.example b/config/initializers/rack_attack.rb.example
index c6d3605dc5a..1d2dee9a054 100644
--- a/config/initializers/rack_attack.rb.example
+++ b/config/initializers/rack_attack.rb.example
@@ -7,6 +7,9 @@ paths_to_be_protected = [
"#{Rails.application.config.relative_url_root}/users/sign_in",
"#{Rails.application.config.relative_url_root}/users"
]
-Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req|
- req.ip if paths_to_be_protected.include?(req.path) && req.post?
+
+unless Rails.env.test?
+ Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req|
+ req.ip if paths_to_be_protected.include?(req.path) && req.post?
+ end
end