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

WIP: Allow scoping rate-limits to specific resources and paths #85

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jcgruenhage
Copy link
Contributor

@jcgruenhage jcgruenhage commented Apr 9, 2023

Resolves #80, and is based on #82.

Still to do:

  • Adjusting the man page and examples
  • Some amount of unit tests
  • Actual testing against LE staging env
  • Change log entry

Future opportunities for improvement:

  • Currently, we parse the duration of each rate limit multiple times during
    sorting, and then again when converting from the config format into the
    runtime format of the rate limit. The solution I'd suggest here is moving
    the parsing of the duration to the time when the config is loaded with
    serde, using https://serde.rs/field-attrs.html#with. This makes the error
    messages nicer as well, as it automatically gives us benefits like including
    the location in the file where stuff went wrong.

@jcgruenhage jcgruenhage force-pushed the fine-grained-rate-limits branch 2 times, most recently from 7c57cff to 5058bac Compare April 12, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine grained rate-limits
1 participant