diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-12-18 13:08:11 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-12-18 13:08:11 +0300 |
commit | c8b2def2be44771ffb479ad989acc7eccf4012f8 (patch) | |
tree | 291f0fee380b62646d2210264332ecdbd53eb389 /config | |
parent | 4a389e761635ad17a707d3caa8ec5bf09b849f2f (diff) |
Add more comments explaining how we block IPs
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/rack_attack_git_basic_auth.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/initializers/rack_attack_git_basic_auth.rb b/config/initializers/rack_attack_git_basic_auth.rb index 2348768ff16..bbbfed68329 100644 --- a/config/initializers/rack_attack_git_basic_auth.rb +++ b/config/initializers/rack_attack_git_basic_auth.rb @@ -1,4 +1,6 @@ unless Rails.env.test? + # Tell the Rack::Attack Rack middleware to maintain an IP blacklist. We will + # update the blacklist from Grack::Auth#authenticate_user. Rack::Attack.blacklist('Git HTTP Basic Auth') do |req| Rack::Attack::Allow2Ban.filter(req.ip, Gitlab.config.rack_attack.git_basic_auth) do # This block only gets run if the IP was not already banned. |