diff options
Diffstat (limited to 'lib/gitlab/devise_failure.rb')
-rw-r--r-- | lib/gitlab/devise_failure.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/devise_failure.rb b/lib/gitlab/devise_failure.rb index ffd057e1d33..2c48ad3b46b 100644 --- a/lib/gitlab/devise_failure.rb +++ b/lib/gitlab/devise_failure.rb @@ -7,6 +7,14 @@ module Gitlab def http_auth? request_format && super end + + def respond + if warden_options[:reason] == :too_many_requests + self.status = 403 + else + super + end + end end end |