Skip to content

Return `429` instead of `302` on Rate Limiter on the raw endpoint

Mayra Cabrera requested to merge 65974-rate-limiter-should-return-429 into master

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

Performance and Testing

Related to #65974 (closed)

Screenshots

When the rate limiter kicks in When the user clicks on 'redirected'
Screen_Shot_2019-08-13_at_11.11.54_AM Screen_Shot_2019-08-13_at_11.12.08_AM
Edited by Mayra Cabrera

Merge request reports

Loading