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:
parent
bf35928a14
commit
680f1ff19c
|
@ -218,6 +218,7 @@ class Middleware::RequestTracker
|
||||||
Error code: #{error_code}.
|
Error code: #{error_code}.
|
||||||
TEXT
|
TEXT
|
||||||
headers = {
|
headers = {
|
||||||
|
"Content-Type" => "text/plain",
|
||||||
"Retry-After" => available_in.to_s,
|
"Retry-After" => available_in.to_s,
|
||||||
"Discourse-Rate-Limit-Error-Code" => error_code,
|
"Discourse-Rate-Limit-Error-Code" => error_code,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue