-
Notifications
You must be signed in to change notification settings - Fork 440
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
How to order rules so that more specific rules override more general rules #436
Comments
Anyone have any suggestions on how to accomplish this? |
Based on the source code, the logic is to use the most restrictive limit for each period. This allows you to define a general catch-all rule and more strict rules for specific endpoints. However, you cannot override the general rule with more loose rules for specific endpoints. I think the endpoint should be defined as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a more complicated setup, but I've simplified it for the purposes of this question.
Imagine that I want every endpoint to be limited to 5 per 20s. I configure as follows:
And that works fine. However, now I want a specific endpoint to be limited either more or less than that. I presumed I would either place it before or after it in the list. However, I cannot seem to get any combination of all/some of these to work. They all result in
"Quota exceeded. Maximum allowed: 5 per 20s. Please try again in 11 second(s)."
because it appears it is always applying the*
rule:How can I have a general catch-all rule, and then provide exceptions that are either more strict or more loose?
The text was updated successfully, but these errors were encountered: