Commit 503280db11d48cca0ea1333e7f3571b0d2d6013d
Exists in
master
and in
4 other branches
Merge branch 'tests_limitation_skip' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
config/initializers/rack_attack.rb.example
... | ... | @@ -7,6 +7,9 @@ paths_to_be_protected = [ |
7 | 7 | "#{Rails.application.config.relative_url_root}/users/sign_in", |
8 | 8 | "#{Rails.application.config.relative_url_root}/users" |
9 | 9 | ] |
10 | -Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req| | |
11 | - req.ip if paths_to_be_protected.include?(req.path) && req.post? | |
10 | + | |
11 | +unless Rails.env.test? | |
12 | + Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req| | |
13 | + req.ip if paths_to_be_protected.include?(req.path) && req.post? | |
14 | + end | |
12 | 15 | end | ... | ... |