diff --git a/lib/rack/attack/configuration.rb b/lib/rack/attack/configuration.rb index ba353ab4..c90fdee6 100644 --- a/lib/rack/attack/configuration.rb +++ b/lib/rack/attack/configuration.rb @@ -5,7 +5,7 @@ module Rack class Attack class Configuration - DEFAULT_BLOCKLISTED_RESPONDER = lambda { |_req| [403, { 'Content-Type' => 'text/plain' }, ["Forbidden\n"]] } + DEFAULT_BLOCKLISTED_RESPONDER = lambda { |_req| [403, { 'content-type' => 'text/plain' }, ["Forbidden\n"]] } DEFAULT_THROTTLED_RESPONDER = lambda do |req| if Rack::Attack.configuration.throttled_response_retry_after_header @@ -13,9 +13,9 @@ class Configuration now = match_data[:epoch_time] retry_after = match_data[:period] - (now % match_data[:period]) - [429, { 'Content-Type' => 'text/plain', 'Retry-After' => retry_after.to_s }, ["Retry later\n"]] + [429, { 'content-type' => 'text/plain', 'retry-after' => retry_after.to_s }, ["Retry later\n"]] else - [429, { 'Content-Type' => 'text/plain' }, ["Retry later\n"]] + [429, { 'content-type' => 'text/plain' }, ["Retry later\n"]] end end