From 344dce363ff387e35db0ad4c5b022c6fc1adabf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 2 Nov 2020 18:23:51 +0100 Subject: [PATCH] Replace deprecated constant --- symfony/framework-bundle/3.3/public/index.php | 2 +- symfony/framework-bundle/4.2/public/index.php | 2 +- symfony/framework-bundle/4.4/public/index.php | 2 +- symfony/framework-bundle/5.1/public/index.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index 59e2e4d4..929197ce 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -13,7 +13,7 @@ if ($_SERVER['APP_DEBUG']) { } if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { diff --git a/symfony/framework-bundle/4.2/public/index.php b/symfony/framework-bundle/4.2/public/index.php index 59e2e4d4..929197ce 100644 --- a/symfony/framework-bundle/4.2/public/index.php +++ b/symfony/framework-bundle/4.2/public/index.php @@ -13,7 +13,7 @@ if ($_SERVER['APP_DEBUG']) { } if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { diff --git a/symfony/framework-bundle/4.4/public/index.php b/symfony/framework-bundle/4.4/public/index.php index 0e303701..d0b6e020 100644 --- a/symfony/framework-bundle/4.4/public/index.php +++ b/symfony/framework-bundle/4.4/public/index.php @@ -13,7 +13,7 @@ if ($_SERVER['APP_DEBUG']) { } if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { diff --git a/symfony/framework-bundle/5.1/public/index.php b/symfony/framework-bundle/5.1/public/index.php index 3f8b90e5..097baa37 100644 --- a/symfony/framework-bundle/5.1/public/index.php +++ b/symfony/framework-bundle/5.1/public/index.php @@ -16,7 +16,7 @@ if ($_SERVER['APP_DEBUG']) { } if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {