mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 22:01:33 +00:00
32 lines
865 B
PHP
32 lines
865 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
class TrustProxies extends Middleware
|
|
{
|
|
/**
|
|
* Trust the upstream reverse proxy chain.
|
|
*
|
|
* This keeps Cloudflare / CDN deployments working without the external
|
|
* package while remaining compatible with Laravel 12 and 13.
|
|
*
|
|
* @var string|array<int, string>|null
|
|
*/
|
|
protected $proxies = '*';
|
|
|
|
/**
|
|
* The headers used to detect proxy forwarding information.
|
|
*/
|
|
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_PREFIX
|
|
| Request::HEADER_X_FORWARDED_AWS_ELB;
|
|
}
|