From 3e5c28f2609fa269d204f951724875602cfe4995 Mon Sep 17 00:00:00 2001 From: r-plus Date: Wed, 24 Dec 2025 18:09:47 +0900 Subject: [PATCH] lowercase header key on README responder example for Rack 3 compatibility --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2878abef..c7c4c46d 100644 --- a/README.md +++ b/README.md @@ -356,9 +356,9 @@ Rack::Attack.throttled_responder = lambda do |request| now = match_data[:epoch_time] headers = { - 'RateLimit-Limit' => match_data[:limit].to_s, - 'RateLimit-Remaining' => '0', - 'RateLimit-Reset' => (now + (match_data[:period] - now % match_data[:period])).to_s + 'ratelimit-limit' => match_data[:limit].to_s, + 'ratelimit-remaining' => '0', + 'ratelimit-reset' => (now + (match_data[:period] - now % match_data[:period])).to_s } [ 429, headers, ["Throttled\n"]]