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.
@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.
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.