Skip to content
Extraits de code Groupes Projets
Valider dda9ac92 rédigé par Eugen Rochko's avatar Eugen Rochko
Parcourir les fichiers

Fix reset date format when rate limited

parent 4495baf4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,7 +11,7 @@ class Rack::Attack ...@@ -11,7 +11,7 @@ class Rack::Attack
headers = { headers = {
'X-RateLimit-Limit' => match_data[:limit].to_s, 'X-RateLimit-Limit' => match_data[:limit].to_s,
'X-RateLimit-Remaining' => '0', '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]] [429, headers, [{ error: 'Throttled' }.to_json]]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter