mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 02:52:44 +00:00
Fix for #1572
This commit is contained in:
@@ -36,13 +36,6 @@ class TrustProxies extends Middleware
|
|||||||
/** @var int The headers to check. */
|
/** @var int The headers to check. */
|
||||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||||
|
|
||||||
/**
|
|
||||||
* The trusted proxies for this application.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $proxies = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TrustProxies constructor.
|
* TrustProxies constructor.
|
||||||
*
|
*
|
||||||
@@ -52,6 +45,9 @@ class TrustProxies extends Middleware
|
|||||||
{
|
{
|
||||||
$trustedProxies = (string)env('TRUSTED_PROXIES', null);
|
$trustedProxies = (string)env('TRUSTED_PROXIES', null);
|
||||||
$this->proxies = explode(',', $trustedProxies);
|
$this->proxies = explode(',', $trustedProxies);
|
||||||
|
if ($trustedProxies === '**') {
|
||||||
|
$this->proxies = '**';
|
||||||
|
}
|
||||||
parent::__construct($config);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user