diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-20 15:09:05 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-03-06 15:41:25 +0100 |
commit | 0ef8a643489ad1a3da4431155326f0a6e206d870 (patch) | |
tree | beb7bceb362f627e4864075e76d05e81f9b743da /app/controllers/application_controller.rb | |
parent | 9cc0ff8f468c54e23172492d97f6d9b428d3ad2e (diff) | |
download | gitlab-ce-0ef8a643489ad1a3da4431155326f0a6e206d870.tar.gz |
Remove unecessary calls to limit_user!, UniqueIps Middleware, and address MR review
- cleanup formating in haml
- clarify time window is in seconds
- cleanup straneous chunks in db/schema
- rename count_uniqe_ips to update_and_return_ips_count
- other
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cc7b7f247e8..0d3ee4f4c1f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -40,6 +40,10 @@ class ApplicationController < ActionController::Base render_403 end + rescue_from Gitlab::Auth::TooManyIps do |e| + head :forbidden, retry_after: UniqueIpsLimiter.config.unique_ips_limit_time_window + end + def redirect_back_or_default(default: root_path, options: {}) redirect_to request.referer.present? ? :back : default, options end |