mirror of
https://github.com/mastodon/mastodon
synced 2024-11-24 15:16:19 +09:00
Fix reset date format when rate limited
This commit is contained in:
parent
4495baf451
commit
dda9ac9222
@ -11,7 +11,7 @@ class Rack::Attack
|
||||
headers = {
|
||||
'X-RateLimit-Limit' => match_data[:limit].to_s,
|
||||
'X-RateLimit-Remaining' => '0',
|
||||
'X-RateLimit-Reset' => (now + (match_data[:period] - now.to_i % match_data[:period])).to_s
|
||||
'X-RateLimit-Reset' => (now + (match_data[:period] - now.to_i % match_data[:period])).iso8601(6)
|
||||
}
|
||||
|
||||
[429, headers, [{ error: 'Throttled' }.to_json]]
|
||||
|
Loading…
Reference in New Issue
Block a user