mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Simplify code for https://github.com/firefly-iii/firefly-iii/issues/5229
This commit is contained in:
parent
ef1bf7c3e6
commit
341478db73
@ -32,9 +32,6 @@ use Illuminate\Contracts\Config\Repository;
|
||||
*/
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/** @var int The headers to check. */
|
||||
//protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
|
||||
/**
|
||||
* TrustProxies constructor.
|
||||
*
|
||||
@ -42,11 +39,7 @@ class TrustProxies extends Middleware
|
||||
*/
|
||||
public function __construct(Repository $config)
|
||||
{
|
||||
$trustedProxies = (string)config('firefly.trusted_proxies');
|
||||
$this->proxies = explode(',', $trustedProxies);
|
||||
if ('**' === $trustedProxies) {
|
||||
$this->proxies = '**';
|
||||
}
|
||||
$this->proxies = (string)config('firefly.trusted_proxies');
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user