TrustedProxyMatcher
final class TrustedProxyMatcher (View source)
Matches peer IP addresses against an explicit, prevalidated set of exact addresses and CIDR networks.
Methods
__construct(array $trustedProxies = [])
Compiles trusted IPv4 and IPv6 entries without resolving hostnames or consulting network state.
isTrusted(string $ip)
Reports whether the supplied literal IP address belongs to an explicitly trusted network.
bool
Details
__construct
__construct(array $trustedProxies = [])
Compiles trusted IPv4 and IPv6 entries without resolving hostnames or consulting network state.
isTrusted
bool
isTrusted(string $ip)
Reports whether the supplied literal IP address belongs to an explicitly trusted network.