Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: As a user of limit-count, I want to communicate the X-RateLimit-Reset header so my api consumers know when their next allocation window starts, this should be communicated on every response even the rejected response. #8381

Closed
harmseru opened this issue Nov 23, 2022 · 3 comments · Fixed by #8578
Assignees
Labels
good first issue Good for newcomers

Comments

@harmseru
Copy link

harmseru commented Nov 23, 2022

Description

  • limit-count plugin does not communicate the X-RateLimit-Reset header only X-RateLimit-Remaining and X-RateLimit-Limit
  • There are no X-RateLimit-* headers communicated on a rejected response, here I believe it can be improved to include the X-RateLimit-Reset header as per draft RFC. This header would also be helpful on response of non-rejected(successful) requests

The improvement of this approach would be that consumers of an API know when they can attempt another API call without having to "poll" for sucessful responses with Retries.

@tzssangglass
Copy link
Member

I think this could be a good first issue. cc @spacewander

@spacewander spacewander added the good first issue Good for newcomers label Nov 23, 2022
@spacewander
Copy link
Member

We need to modify the code to record the time when we start to count.

@mscb402
Copy link
Contributor

mscb402 commented Nov 25, 2022

please assign to me @spacewander

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants