hypothetical/app/Http/Middleware/TrustProxies.php

29 lines
649 B
PHP
Raw Permalink Normal View History

<?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;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
2022-05-23 21:01:33 -04:00
* @var array<int, string>|string|null
*/
protected $proxies;
/**
2018-03-05 18:45:02 -05:00
* The headers that should be used to detect proxies.
*
* @var int
*/
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;
}