Skip to content

Commit 308f626

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #494
2 parents f2d8bb6 + f6585a3 commit 308f626

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

symfony/framework-bundle/3.3/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"APP_ENV": "dev",
1616
"APP_SECRET": "%generate(secret)%",
1717
"#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2",
18-
"#TRUSTED_HOSTS": "localhost,example.com"
18+
"#TRUSTED_HOSTS": "'^localhost|example\\.com$'"
1919
},
2020
"gitignore": [
2121
"/.env.local",

symfony/framework-bundle/3.3/public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
20-
Request::setTrustedHosts(explode(',', $trustedHosts));
20+
Request::setTrustedHosts([$trustedHosts]);
2121
}
2222

2323
$kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);

symfony/framework-bundle/4.2/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"APP_ENV": "dev",
1616
"APP_SECRET": "%generate(secret)%",
1717
"#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2",
18-
"#TRUSTED_HOSTS": "localhost,example.com"
18+
"#TRUSTED_HOSTS": "'^localhost|example\\.com$'"
1919
},
2020
"gitignore": [
2121
"/.env.local",

symfony/framework-bundle/4.2/public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
20-
Request::setTrustedHosts(explode(',', $trustedHosts));
20+
Request::setTrustedHosts([$trustedHosts]);
2121
}
2222

2323
$kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);

0 commit comments

Comments
 (0)