diff --git a/symfony/framework-bundle/3.3/manifest.json b/symfony/framework-bundle/3.3/manifest.json index bffbcfe7..ad7fd41a 100644 --- a/symfony/framework-bundle/3.3/manifest.json +++ b/symfony/framework-bundle/3.3/manifest.json @@ -15,7 +15,7 @@ "APP_ENV": "dev", "APP_SECRET": "%generate(secret)%", "#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2", - "#TRUSTED_HOSTS": "localhost,example.com" + "#TRUSTED_HOSTS": "'^localhost|example\\.com$'" }, "gitignore": [ "/.env.local", diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index 3f40a88b..9b4b36b4 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -17,7 +17,7 @@ if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { - Request::setTrustedHosts(explode(',', $trustedHosts)); + Request::setTrustedHosts([$trustedHosts]); } $kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']); diff --git a/symfony/framework-bundle/4.2/manifest.json b/symfony/framework-bundle/4.2/manifest.json index bffbcfe7..ad7fd41a 100644 --- a/symfony/framework-bundle/4.2/manifest.json +++ b/symfony/framework-bundle/4.2/manifest.json @@ -15,7 +15,7 @@ "APP_ENV": "dev", "APP_SECRET": "%generate(secret)%", "#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2", - "#TRUSTED_HOSTS": "localhost,example.com" + "#TRUSTED_HOSTS": "'^localhost|example\\.com$'" }, "gitignore": [ "/.env.local", diff --git a/symfony/framework-bundle/4.2/public/index.php b/symfony/framework-bundle/4.2/public/index.php index 3f40a88b..9b4b36b4 100644 --- a/symfony/framework-bundle/4.2/public/index.php +++ b/symfony/framework-bundle/4.2/public/index.php @@ -17,7 +17,7 @@ if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? } if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { - Request::setTrustedHosts(explode(',', $trustedHosts)); + Request::setTrustedHosts([$trustedHosts]); } $kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);