FIX: Add content-type header to rate limiter error

It's best to always set a content-type header and one was missing here.
This commit is contained in:
Michael Brown 2024-03-26 11:37:20 -04:00 committed by Michael Brown
parent bf35928a14
commit 680f1ff19c
1 changed files with 1 additions and 0 deletions

View File

@ -218,6 +218,7 @@ class Middleware::RequestTracker
Error code: #{error_code}.
TEXT
headers = {
"Content-Type" => "text/plain",
"Retry-After" => available_in.to_s,
"Discourse-Rate-Limit-Error-Code" => error_code,
}