Merge pull request #494

This commit is contained in:
symfony-flex-server[bot]
2018-11-17 22:20:42 +00:00
committed by GitHub
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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",
@@ -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']);
+1 -1
View File
@@ -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",
@@ -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']);