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