2017-09-26 13:22:15 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
2022-05-23 21:01:33 -04:00
|
|
|
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
2019-10-31 17:24:53 -04:00
|
|
|
use Illuminate\Http\Request;
|
2017-09-26 13:22:15 -04:00
|
|
|
|
|
|
|
class TrustProxies extends Middleware
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The trusted proxies for this application.
|
|
|
|
*
|
2022-05-23 21:01:33 -04:00
|
|
|
* @var array<int, string>|string|null
|
2017-09-26 13:22:15 -04:00
|
|
|
*/
|
|
|
|
protected $proxies;
|
|
|
|
|
|
|
|
/**
|
2018-03-05 18:45:02 -05:00
|
|
|
* The headers that should be used to detect proxies.
|
2017-09-26 13:22:15 -04:00
|
|
|
*
|
2018-11-02 18:12:07 -04:00
|
|
|
* @var int
|
2017-09-26 13:22:15 -04:00
|
|
|
*/
|
2022-05-23 21:01:33 -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;
|
2017-09-26 13:22:15 -04:00
|
|
|
}
|