Closed honggyu420 closed 2 years ago
Thanks for the feedback! Just made another commit following your suggestions.
Hi guys,
@honggyu420 Understanding this PR allows to enter these in the Whitelist IPs setting, correct?
@tamara-m yup!
Cool! Thank you 🙂
What?
The current version only supports lists of IP addresses for Wordpress sites to whitelist. This PR expands the functionality to cover IP ranges.
Why?
For when IP address of Wordpress sites are dynamic within subnets. I ran into this problem as my Wordpress sites were behind Cloudflare proxies and wanted to whitelist Cloudflare IP ranges.
How?
Each item in
$ip_whitelist
will be converted to a valid CIDR, appending/32
to ip addresses. A new method calledcidr_match
was implemented to check the remote server IP address to the whitelisted CIDRs.