From 59a54c03b003b4e1b7da13a6a2b79361b3394442 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 21 Jun 2022 09:58:36 +0000 Subject: [PATCH] Replace deprecated `HEADER_X_FORWARDED_ALL` constant --- app/Http/Middleware/TrustProxies.php | 2 +- config/trustedproxy.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index c58b020758e8..918b15f746af 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -11,7 +11,7 @@ namespace App\Http\Middleware; -use Fideloper\Proxy\TrustProxies as Middleware; +use Illuminate\Http\Middleware\TrustProxies as Middleware; use Illuminate\Contracts\Config\Repository; use Illuminate\Http\Request; diff --git a/config/trustedproxy.php b/config/trustedproxy.php index e618ae2475a1..dcc264296757 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -1,5 +1,7 @@ Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, + 'headers' => Illuminate\Http\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, ];