-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add RateLimiter config property to enable limiting on specific nodes #236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work, though I'd prefer to consider this a temporary change, to be reverted and re-approached for, and backported from, upstream.
My only suggestion is not functional: I don't like overrideNodeProperty()
as a method name; it's very opaque. Perhaps: maybeEnableForHost(String hostname)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now I think (again, provisionally, with the expectation that we'll revert and pursue similar upstream).
I edited the issue title to be more descriptive.
if (!this.enabled && !hostname.isEmpty()) { | ||
if (this.nodesEnabled != null && !this.nodesEnabled.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no reason not to have these all as one if
clause. Fine this way too, just a little unusual.
Definitely, that should part of whole pluggable architecture proposal. |
nodesEnabled
"nodesEnabled": "localhost"