adrema/app/Http/Middleware/TrustProxies.php

29 lines
655 B
PHP
Raw Permalink Normal View History

2020-04-10 20:32:12 +02:00
<?php
namespace App\Http\Middleware;
2022-02-28 21:12:15 +01:00
use Illuminate\Http\Middleware\TrustProxies as Middleware;
2020-04-10 20:32:12 +02:00
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
2023-02-13 15:56:20 +01:00
* @var array<int, string>|string|null
2020-04-10 20:32:12 +02:00
*/
2023-07-25 12:03:31 +02:00
protected $proxies = '*';
2020-04-10 20:32:12 +02:00
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
2022-02-28 21:12:15 +01: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;
2020-04-10 20:32:12 +02:00
}