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:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-02-17 14:52:27 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-03-06 17:41:25 +0300
commit8993801f0cefdc64b46b8fe30622cc78eaa03173 (patch)
treef9a9a38c91e99f03ea87978119a03538d1e91175 /lib/api/api.rb
parent66dc71599cb698d380e14be7230ae3495c78d266 (diff)
Test various login scenarios if the limit gets enforced
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 89449ce8813..6f37fa9d8e9 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -60,6 +60,10 @@ module API
error! e.message, e.status, e.headers
end
+ rescue_from Gitlab::Auth::TooManyIps do |e|
+ rack_response({'message'=>'403 Forbidden'}.to_json, 403)
+ end
+
rescue_from :all do |exception|
handle_api_exception(exception)
end