mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 12:46:07 +10:00
11 lines
367 B
Ruby
11 lines
367 B
Ruby
unless Rails.env.test?
|
|
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.
|
|
# Return false, meaning that we do not see anything wrong with the
|
|
# request at this time
|
|
false
|
|
end
|
|
end
|
|
end
|