Return `429` instead of `302` on Rate Limiter on the raw endpoint
What does this MR do?
Changes HTTP response on the Rate Limiter on the Raw endpoint from 302
to 429
. Because of:
- If clients are set to follow HTTP redirects, they will redirect to the "non-raw"
Projects::BlobController
HTML version of the endpoint, inadvertently leading to more load on our servers instead of less. - Using the correct status codes makes it easier to track rate limiting events.
Rate Limiter is currently disabled because of this https://gitlab.com/gitlab-org/gitlab-ce/issues/65974#note_203014517
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
- [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
Related to #65974 (closed)
Screenshots
When the rate limiter kicks in | When the user clicks on 'redirected' |
---|---|
Edited by Mayra Cabrera