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

pr-welcome

#1

Hi,

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


Global rate limits and throttling in Discourse
(Sam Saffron) #2

Sure, sounds like a good suggestion


#3

Taking a stab at this :wink:



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