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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-27 09:09:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-27 09:09:47 +0300
commitb505d34cfffb03e1b9b718e01c3d85221683a695 (patch)
tree899f4aa884d4fad7b96b77254d7764eb5c7180ac /lib/gitlab/rack_attack.rb
parentd99ae624301a81cf0d2efa73d91cac07313ae949 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/rack_attack.rb')
-rw-r--r--lib/gitlab/rack_attack.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/rack_attack.rb b/lib/gitlab/rack_attack.rb
index 222f5d57adf..1b55a81709c 100644
--- a/lib/gitlab/rack_attack.rb
+++ b/lib/gitlab/rack_attack.rb
@@ -7,6 +7,8 @@ module Gitlab
def self.configure(rack_attack)
# This adds some methods used by our throttles to the `Rack::Request`
rack_attack::Request.include(Gitlab::RackAttack::Request)
+ # Send the Retry-After header so clients (e.g. python-gitlab) can make good choices about delays
+ Rack::Attack.throttled_response_retry_after_header = true
# Configure the throttles
configure_throttles(rack_attack)
end