Skip to content

Commit

Permalink
Merge pull request #12598 from empirical-org/develop
Browse files Browse the repository at this point in the history
Fix RackAttack configuration (#12596)
  • Loading branch information
brendanshean authored Nov 25, 2024
2 parents 3bf59d8 + e19710b commit cd231c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/QuillLMS/config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Rack::Attack
req.path.match?(BLOCKLIST_REGEX)
end

Rack::Attack.throttled_response = lambda do |_request|
Rack::Attack.throttled_responder = lambda do |_request|
# NB: you have access to the name and other data about the matched throttle
# request.env['rack.attack.matched'],
# request.env['rack.attack.match_type'],
Expand All @@ -39,7 +39,7 @@ class Rack::Attack
THROTTLE_RESPONSE
end

Rack::Attack.blocklisted_response = lambda do |_request|
Rack::Attack.blocklisted_responder = lambda do |_request|
BLOCKLIST_RESPONSE
end
end

0 comments on commit cd231c5

Please sign in to comment.