mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-16 21:18:19 +01:00
Fix use of env. Closes #3651
This commit is contained in:
parent
76e9f41e55
commit
a3bbeb541e
@ -13,6 +13,7 @@ namespace CachetHQ\Cachet\Http\Middleware;
|
||||
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
/**
|
||||
* This is the trust proxies middleware class.
|
||||
@ -42,6 +43,8 @@ class TrustProxies extends Middleware
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->proxies = empty(env('TRUSTED_PROXIES')) ? '*' : explode(',', trim(env('TRUSTED_PROXIES')));
|
||||
$proxies = Config::get('trustedproxies.proxies');
|
||||
|
||||
$this->proxies = empty($proxies) ? '*' : explode(',', trim($proxies));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ return [
|
||||
* of your proxy (e.g. if using ELB or similar).
|
||||
*
|
||||
*/
|
||||
'proxies' => null, // [<ip addresses>,], '*'
|
||||
'proxies' => env('TRUSTED_PROXIES'), // [<ip addresses>,], '*'
|
||||
|
||||
/*
|
||||
* To trust one or more specific proxies that connect
|
||||
|
Loading…
x
Reference in New Issue
Block a user