Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rack_attack_git_basic_auth.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2348768ff1695a4aadec6b8db91143214561f48d (plain)
1
2
3
4
5
6
7
8
9
10
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