Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for rate limiting on especially vulnerable endpoints.
Behavior
When a client exceeds the maximum permitted amount of requests for a given endpoint, a
429 Too Many Requestswill be returned. Additionally a set of headers is added to responses for affected endpoints:X-RateLimit-Limitu32X-RateLimit-Remainingu32X-RateLimit-NearLimitboolX-RateLimit-RetryAfteru64A new permission called
BypassRateLimitis added which allows certain users to exceed the new limitations. By default, this permission is set on the initial user created within the internal user authentication system. When no authentication system is in used, all requests are limited.Affected Endpoints
POST v1/auth/login- 8 request burst, regains 1 per 10 minutes by defaultPOST v1/document- 10 per hourGET v1/document/:id- 30 per hour