phpldapadmin/app/Http/Middleware/TrustProxies.php

29 lines
649 B
PHP
Raw Normal View History

2019-05-14 07:52:49 +00:00
<?php
namespace App\Http\Middleware;
2023-01-27 10:35:00 +00:00
use Illuminate\Http\Middleware\TrustProxies as Middleware;
2020-08-23 01:37:08 +00:00
use Illuminate\Http\Request;
2019-05-14 07:52:49 +00:00
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
2023-01-27 10:35:00 +00:00
* @var array<int, string>|string|null
2019-05-14 07:52:49 +00:00
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
2023-01-27 10:35:00 +00: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-05-14 07:52:49 +00:00
}