2017-12-17 19:07:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Middleware;
|
|
|
|
|
2022-02-26 16:15:20 +00:00
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
2017-12-17 19:07:38 +00:00
|
|
|
|
|
|
|
class TrustProxies extends Middleware
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The trusted proxies for this application.
|
|
|
|
*
|
2022-02-26 16:15:20 +00:00
|
|
|
* @var array<int, string>|string|null
|
2017-12-17 19:07:38 +00:00
|
|
|
*/
|
|
|
|
protected $proxies;
|
|
|
|
|
|
|
|
/**
|
2018-05-20 23:49:54 +00:00
|
|
|
* The headers that should be used to detect proxies.
|
2017-12-17 19:07:38 +00:00
|
|
|
*
|
2018-05-20 23:49:54 +00:00
|
|
|
* @var int
|
2017-12-17 19:07:38 +00:00
|
|
|
*/
|
2022-02-26 16:15:20 +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;
|
2017-12-17 19:07:38 +00:00
|
|
|
}
|