From 35d5f532bc5fc4ec77901d4475819093d44c3f65 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 3 Dec 2021 12:36:21 +1100 Subject: [PATCH] Fixes for trusted proxies --- app/Http/Middleware/StartupCheck.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index 777cd49125..d7f08fff10 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -38,9 +38,9 @@ class StartupCheck // set TRUSTED_PROXIES=* if you want to trust every proxy. if (isset($_ENV['TRUSTED_PROXIES'])) { if (env('TRUSTED_PROXIES') == '*') { - $request->setTrustedProxies(['127.0.0.1', $request->server->get('REMOTE_ADDR')]); + $request->setTrustedProxies(['127.0.0.1', $request->server->get('REMOTE_ADDR')],Request::HEADER_X_FORWARDED_ALL); } else{ - $request->setTrustedProxies(array_map('trim', explode(',', env('TRUSTED_PROXIES')))); + $request->setTrustedProxies(array_map('trim', explode(',', env('TRUSTED_PROXIES'))),Request::HEADER_X_FORWARDED_ALL); } }