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>2021-09-01 21:08:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-01 21:08:49 +0300
commitd551c55bb0e691f06655bcda5fe9566164fd3e46 (patch)
tree66320e68b9c2d3567bfbde9ad171e9543186a462 /lib/gitlab/throttle.rb
parent9c191c0b942eb08360f4d64c038c435b1156e15f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/throttle.rb')
-rw-r--r--lib/gitlab/throttle.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/throttle.rb b/lib/gitlab/throttle.rb
index 8f045021088..df2b3fbc1af 100644
--- a/lib/gitlab/throttle.rb
+++ b/lib/gitlab/throttle.rb
@@ -63,6 +63,13 @@ module Gitlab
{ limit: limit_proc, period: period_proc }
end
+ def self.throttle_authenticated_git_lfs_options
+ limit_proc = proc { |req| settings.throttle_authenticated_git_lfs_requests_per_period }
+ period_proc = proc { |req| settings.throttle_authenticated_git_lfs_period_in_seconds.seconds }
+
+ { limit: limit_proc, period: period_proc }
+ end
+
def self.rate_limiting_response_text
(settings.rate_limiting_response_text.presence || DEFAULT_RATE_LIMITING_RESPONSE_TEXT) + "\n"
end