Closed homeyjd closed 3 years ago
I too need this functionality.
Hi @homeyjd Sorry, I saw your code just after I commited my own code. I think my code is a bit cleaner (no offence), although I only support CIDR. I really don't see the need for wildcards. I see your code still is not merged. 2 years ago :-(. Any idea why it is not merged yet?
I have no excuse for how long this has taken me to get to. I'm taking this, but it needed rebasing, which is #28.
Only activated if trusted proxy value contains a "*" (wildcard) or "/" (CIDR). Uses strpos() on object-creation, so very low performance hit. Tests are included.
I need CIDR matching for using this library within a load-balanced AWS VPC. There is no way to accurately predict the IP addresses for the load balancer nodes, you only know the IP range via CIDR block.