This commit is contained in:
James Cole
2018-07-28 15:10:20 +02:00
parent 0c104cd86c
commit fb122ba097

View File

@@ -36,13 +36,6 @@ class TrustProxies extends Middleware
/** @var int The headers to check. */
protected $headers = Request::HEADER_X_FORWARDED_ALL;
/**
* The trusted proxies for this application.
*
* @var array|string
*/
protected $proxies = [];
/**
* TrustProxies constructor.
*
@@ -52,6 +45,9 @@ class TrustProxies extends Middleware
{
$trustedProxies = (string)env('TRUSTED_PROXIES', null);
$this->proxies = explode(',', $trustedProxies);
if ($trustedProxies === '**') {
$this->proxies = '**';
}
parent::__construct($config);
}
}