diff --git a/src/TrustProxies.php b/src/TrustProxies.php index 79c2615..b858961 100644 --- a/src/TrustProxies.php +++ b/src/TrustProxies.php @@ -69,7 +69,7 @@ protected function setTrustedProxyIpAddresses(Request $request) // Trust any IP address that calls us // `**` for backwards compatibility, but is deprecated if ($trustedIps === '*' || $trustedIps === '**') { - return $this->setTrustedProxyIpAddressesToTheCallingIp($request); + $trustedIps = '0.0.0.0/0'; } // Support IPs addresses separated by comma diff --git a/tests/TrustedProxyTest.php b/tests/TrustedProxyTest.php index aa53090..6e2cb13 100644 --- a/tests/TrustedProxyTest.php +++ b/tests/TrustedProxyTest.php @@ -140,9 +140,9 @@ public function test_get_client_ip_with_muliple_ip_addresses_all_proxies_are_tru $forwardedFor = [ '192.0.2.2', - '192.0.2.199, 192.0.2.2', - '192.0.2.199,192.0.2.2', - '99.99.99.99,192.0.2.199,192.0.2.2', + '192.0.2.2, 192.0.2.199', + '192.0.2.2,192.0.2.199', + '192.0.2.2,192.0.2.199,99.99.99.99', ]; foreach($forwardedFor as $forwardedForHeader) {