Skip to content

Commit

Permalink
[8.x] Fixes getting the trusted proxies IPs from the configuration fi…
Browse files Browse the repository at this point in the history
…le (#41322)

* Update TrustProxies.php

* Use getter
  • Loading branch information
nunomaduro committed Mar 3, 2022
1 parent 59d186c commit 326db93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Http/Middleware/TrustProxies.php
Expand Up @@ -47,7 +47,7 @@ public function handle(Request $request, Closure $next)
*/
protected function setTrustedProxyIpAddresses(Request $request)
{
$trustedIps = $this->proxies();
$trustedIps = $this->proxies() ?: config('trustedproxy.proxies');

if ($trustedIps === '*' || $trustedIps === '**') {
return $this->setTrustedProxyIpAddressesToTheCallingIp($request);
Expand Down

0 comments on commit 326db93

Please sign in to comment.