Skip to content

Commit

Permalink
Adds X-RateLimit-Reset header to throttled response (#15275)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschniepp authored and taylorotwell committed Sep 5, 2016
1 parent 2992315 commit eeae0bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Illuminate/Routing/Middleware/ThrottleRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ protected function addHeaders(Response $response, $maxAttempts, $remainingAttemp

if (! is_null($retryAfter)) {
$headers['Retry-After'] = $retryAfter;
$headers['X-RateLimit-Reset'] = time() + $retryAfter;
}

$response->headers->add($headers);
Expand Down

0 comments on commit eeae0bb

Please sign in to comment.