When rate limiting is hit return return a Retry-After header

Hi,

Shouldn’t the delay to wait be in the Response as a Retry-After header?

5 Likes

Sure, sounds like a good suggestion

3 Likes

Taking a stab at this :wink:


https://github.com/discourse/discourse/pull/5659


I am assuming:

Retry-After shouldn’t be set in controller actions like the following, where the retry time is (intentionally) hidden from the end user.

https://github.com/xrav3nz/discourse/blob/60e5f39130ca1e4711400955969990fa283fa969/app/controllers/invites_controller.rb#L151

6 Likes

Hi,

Seems like the PR is merged but I don’t observe any ‘Retry-After’ headers.
Here you can see the body of my error:


And here you can see the headers:

Is this a bug? Thanks in advance