pingcrm/app/Http/Middleware/TrustProxies.php

29 lines
649 B
PHP
Raw Normal View History

2019-03-05 18:10:11 -03:00
<?php
namespace App\Http\Middleware;
2021-12-08 13:59:08 -03:00
use Illuminate\Http\Middleware\TrustProxies as Middleware;
2020-07-29 11:37:19 -03:00
use Illuminate\Http\Request;
2019-03-05 18:10:11 -03:00
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
2021-12-08 13:59:08 -03:00
* @var array<int, string>|string|null
2019-03-05 18:10:11 -03:00
*/
2021-12-08 13:59:08 -03:00
protected $proxies;
2019-03-05 18:10:11 -03:00
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
2021-12-08 13:59:08 -03: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;
2019-03-05 18:10:11 -03:00
}