Skip to content

Commit

Permalink
#386 Added Retry-After header
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Apr 26, 2014
1 parent e1329af commit c09b968
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/auth/index.js
Expand Up @@ -471,6 +471,7 @@ auth.checkRateLimits = function (req, res, callback) {
res.header("X-RateLimit-Limit", req.limits.limit);
res.header("X-RateLimit-Remaining", req.limits.remaining < 0 ? 0 : req.limits.remaining);
res.header("X-RateLimit-Reset", req.limits.reset);
res.header("Retry-After", Math.floor(ttl / 1000));

if (req.limits.remaining < 0)
return callback(new Error('Limit exceeded'));
Expand Down

0 comments on commit c09b968

Please sign in to comment.