-
Notifications
You must be signed in to change notification settings - Fork 358
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(policies): blacklist/whitelist add support for IPv6, CIDR, ranges. #2027
feat(policies): blacklist/whitelist add support for IPv6, CIDR, ranges. #2027
Conversation
Bit of a slog in old UI, but it's done...
apiman-new-blocklist.mov |
BTW, this has been implemented in a way that should be fully backwards compatible (the parser on the backend infers whether it's IPv6 vs IPv4, there's some simple logic to pick out ranges, etc.). So, please test out any existing rulesets you have. |
@msavy There might be a problem with the cache as the cache entries are never invalidated. Currently if I make a request that should pass the IP is added into the cache as (IP, false) which is okay. |
Thanks. I will double check my logic for the cache keys, I was meant to include the configuration in the key (hence adding a hash function to the config!), but looks like I forgot about it at some point. |
abb36bb
to
5b149c0
Compare
@volkflo please try again 👍 |
Okay tested it again, as far as I can tell it works fine now 👍 |
<button id="add" ng-disabled="!ipAddress || isEntityDisabled()" ng-click="add(ipAddress)" data-field="add" apiman-i18n-key="add" class="btn btn-default" style="min-width: 75px">Add</button> | ||
</div> | ||
<!-- Use ng-model-options allowInvalid, otherwise value is not set until it passes validation, meaning we can't display any useful hints/prompts for user --> | ||
<input id="ip-address" name="ipinput" ng-model="ipAddress" data-field="ipAddress" class="form-control" style="max-width: 300px; float: left; margin-right: 5px" type="text" apiman-i18n-key="iplist.enter-ip-address" placeholder="Enter an IP address..." ng-disabled="isEntityDisabled()" ng-model-options="{ updateOn: 'default', allowInvalid:'true' }" validate-ip-address/> |
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.
@msavy Can we try to avoid these inline styles, as they are really annoying to overwrite if someone wants to do a little bit of customization
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.
I'm going to completely re-format the TS and HTML of the project once we've done 3.0.0.Final (using prettier or similar).
I agree having very long lines like this makes it difficult to spot the difference (I only added name
and changed width slightly.
Thanks for testing and feedback, will merge today. |
No description provided.