diff --git a/lib/rate_limiting.rb b/lib/rate_limiting.rb index 88b4e53..8a7a1c3 100644 --- a/lib/rate_limiting.rb +++ b/lib/rate_limiting.rb @@ -25,7 +25,7 @@ def respond(env, limit_header) def rate_limit_exceeded(accept) case accept.gsub(/;.*/, "").split(',')[0] when "text/xml" then message, type = xml_error("403", "Rate Limit Exceeded"), "text/xml" - when "application/json" then message, type = ["Rate Limit Exceeded"].to_json, "application/json" + when "application/json" then message, type = ["Rate Limit Exceeded"], "application/json" else message, type = ["Rate Limit Exceeded"], "text/html" end