hypothetical/app/Http/Middleware/TrustProxies.php

24 lines
585 B
PHP
Raw Normal View History

<?php
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
2019-10-31 17:24:53 -04:00
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
2020-07-23 16:12:26 -04:00
* @var array|string|null
*/
protected $proxies;
/**
2018-03-05 18:45:02 -05:00
* The headers that should be used to detect proxies.
*
* @var int
*/
2021-04-20 17:11:13 -04:00
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
}