mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Expand support for trusted proxies configuration.
This commit is contained in:
@@ -50,8 +50,14 @@ class TrustProxies extends Middleware
|
||||
public function __construct(Repository $config)
|
||||
{
|
||||
$trustedProxies = env('TRUSTED_PROXIES', null);
|
||||
if (false !== $trustedProxies && null !== $trustedProxies && strlen($trustedProxies) > 0) {
|
||||
$this->proxies = (string)$trustedProxies;
|
||||
if (false !== $trustedProxies && null !== $trustedProxies && \strlen($trustedProxies) > 0) {
|
||||
if ($trustedProxies === '*' || $trustedProxies === '**') {
|
||||
$this->proxies = (string)$trustedProxies;
|
||||
|
||||
}
|
||||
if ($trustedProxies !== '*' && $trustedProxies !== '**') {
|
||||
$this->proxies = explode(',', $trustedProxies);
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
|
Reference in New Issue
Block a user