[tor-commits] [dip/master] Support new Rack::Attack
hiro at torproject.org
hiro at torproject.org
Mon Dec 9 14:42:42 UTC 2019
commit fa94c7b46953d60e88862d6323a5c89ce8c88b64
Author: Bastian Blank <waldi at debian.org>
Date: Sun Nov 24 19:47:27 2019 +0100
Support new Rack::Attack
---
roles/gitlab/templates/rack_attack.rb.j2 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/roles/gitlab/templates/rack_attack.rb.j2 b/roles/gitlab/templates/rack_attack.rb.j2
index d4dec95..b48bf5e 100644
--- a/roles/gitlab/templates/rack_attack.rb.j2
+++ b/roles/gitlab/templates/rack_attack.rb.j2
@@ -28,7 +28,7 @@ unless Rails.env.test? || !rack_attack_enabled
end
end
-Rack::Attack.blacklist("block from ip blacklist") do |req|
+Rack::Attack.blocklist("block from ip blacklist") do |req|
::Gitlab::Redis::SharedState.with do |redis|
begin
ip = IPAddr.new(req.ip)
@@ -58,7 +58,7 @@ Rack::Attack.blacklist("block from ip blacklist") do |req|
end
end
-Rack::Attack.blacklisted_response = lambda do |env|
+Rack::Attack.blocklisted_response = lambda do |env|
reason = env['RACK_ATTACK_BLACKLIST_REASON']
if reason != ''
text = "Forbidden, #{reason}\n"
More information about the tor-commits
mailing list