Skip to content

throttling: fix RateLimit-Reset header

The RateLimit-Reset header was using the wait() method from Django REST Framework. This method computes the suggested time to wait before the next request to avoid hitting the rate limit.

Instead, we use the duration (width of the rate limiting bucket) and add the timestamp of the first known request to it.

Thanks to @marmoute for the report.

Edited by Nicolas Dandrimont

Merge request reports