summaryrefslogtreecommitdiff
path: root/lib/api/internal
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/internal')
-rw-r--r--lib/api/internal/base.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/api/internal/base.rb b/lib/api/internal/base.rb
index dbd5c5f9db1..3f6e052f7b6 100644
--- a/lib/api/internal/base.rb
+++ b/lib/api/internal/base.rb
@@ -44,16 +44,12 @@ module API
# This is a separate method so that EE can alter its behaviour more
# easily.
- if Feature.enabled?(:rate_limit_gitlab_shell)
- check_rate_limit!(:gitlab_shell_operation, scope: [params[:action], params[:project], actor.key_or_user])
- end
+ check_rate_limit!(:gitlab_shell_operation, scope: [params[:action], params[:project], actor.key_or_user])
- if Feature.enabled?(:rate_limit_gitlab_shell_by_ip, actor.user)
- rate_limiter = Gitlab::Auth::IpRateLimiter.new(request.ip)
+ rate_limiter = Gitlab::Auth::IpRateLimiter.new(request.ip)
- unless rate_limiter.trusted_ip?
- check_rate_limit!(:gitlab_shell_operation, scope: [params[:action], params[:project], rate_limiter.ip])
- end
+ unless rate_limiter.trusted_ip?
+ check_rate_limit!(:gitlab_shell_operation, scope: [params[:action], params[:project], rate_limiter.ip])
end
# Stores some Git-specific env thread-safely