From 764bcad7eac0384c75ce452e065f57a0d32d0a61 Mon Sep 17 00:00:00 2001 From: Choraimy Kroonstuiver <3661474+axlon@users.noreply.github.com> Date: Thu, 21 Oct 2021 13:37:17 +0200 Subject: [PATCH] Remove TrustHosts reliance on config helper --- src/Illuminate/Http/Middleware/TrustHosts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Http/Middleware/TrustHosts.php b/src/Illuminate/Http/Middleware/TrustHosts.php index 8b563151adc0..fd7e601518f0 100644 --- a/src/Illuminate/Http/Middleware/TrustHosts.php +++ b/src/Illuminate/Http/Middleware/TrustHosts.php @@ -55,7 +55,7 @@ public function handle(Request $request, $next) */ protected function shouldSpecifyTrustedHosts() { - return config('app.env') !== 'local' && + return ! $this->app->environment('local') && ! $this->app->runningUnitTests(); }