From 93b6ef140b9822125cd1fde8b7d626cec4fc8eb5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 25 Apr 2020 11:39:24 +0200 Subject: [PATCH] [symfony/framework-bundle] minor cleanup --- symfony/framework-bundle/3.3/public/index.php | 4 ++-- symfony/framework-bundle/4.2/public/index.php | 4 ++-- symfony/framework-bundle/4.4/public/index.php | 4 ++-- symfony/framework-bundle/5.1/public/index.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index e30f90c0..59e2e4d4 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -12,11 +12,11 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) { +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { Request::setTrustedHosts([$trustedHosts]); } diff --git a/symfony/framework-bundle/4.2/public/index.php b/symfony/framework-bundle/4.2/public/index.php index e30f90c0..59e2e4d4 100644 --- a/symfony/framework-bundle/4.2/public/index.php +++ b/symfony/framework-bundle/4.2/public/index.php @@ -12,11 +12,11 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) { +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { Request::setTrustedHosts([$trustedHosts]); } diff --git a/symfony/framework-bundle/4.4/public/index.php b/symfony/framework-bundle/4.4/public/index.php index f094a9b1..0e303701 100644 --- a/symfony/framework-bundle/4.4/public/index.php +++ b/symfony/framework-bundle/4.4/public/index.php @@ -12,11 +12,11 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) { +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { Request::setTrustedHosts([$trustedHosts]); } diff --git a/symfony/framework-bundle/5.1/public/index.php b/symfony/framework-bundle/5.1/public/index.php index f3b571cf..3f8b90e5 100644 --- a/symfony/framework-bundle/5.1/public/index.php +++ b/symfony/framework-bundle/5.1/public/index.php @@ -15,11 +15,11 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) { +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { Request::setTrustedHosts([$trustedHosts]); }