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) {