From 8313e38df329f9c78eb9578a7e94d8518506397a Mon Sep 17 00:00:00 2001 From: Adrian CB Date: Tue, 8 Mar 2022 16:58:58 +1100 Subject: [PATCH] fix(documentation): Updating README with non-deprecated configuration. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6ae610..fb8aa21 100644 --- a/README.md +++ b/README.md @@ -347,8 +347,8 @@ Rack::Attack.throttled_response_retry_after_header = true Here's an example response that includes conventional `RateLimit-*` headers: ```ruby -Rack::Attack.throttled_response = lambda do |env| - match_data = env['rack.attack.match_data'] +Rack::Attack.throttled_responder = lambda do |request| + match_data = request.env['rack.attack.match_data'] now = match_data[:epoch_time] headers = {