Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/TrustedProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down