Install Laravel 5.6

This commit is contained in:
James Brooks
2018-06-17 00:23:59 +01:00
parent bdacc81b8d
commit 57aef06927
80 changed files with 2105 additions and 1461 deletions

View File

@@ -0,0 +1,47 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
/**
* This is the trust proxies middleware class.
*
* @author James Brooks <james@alt-three.com>
*/
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
/**
* Create new trust proxies instance.
*
* @return void
*/
public function __construct()
{
$this->proxies = empty(env('TRUSTED_PROXIES')) ? '*' : explode(',', trim(env('TRUSTED_PROXIES')));
}
}