Remove APP_ prefix

This commit is contained in:
Kévin Dunglas
2017-12-02 17:15:05 +01:00
parent 629e7320c3
commit b324d5de53
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -14,8 +14,8 @@
"env": {
"APP_ENV": "dev",
"APP_SECRET": "%generate(secret)%",
"#APP_TRUSTED_PROXIES": "127.0.0.1,127.0.0.2",
"#APP_TRUSTED_HOSTS": "localhost,example.com"
"#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2",
"#TRUSTED_HOSTS": "localhost,example.com"
},
"gitignore": [
".env",
@@ -21,11 +21,11 @@ if ($_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) {
Debug::enable();
}
if ($trustedProxies = $_SERVER['APP_TRUSTED_PROXIES'] ?? false) {
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['APP_TRUSTED_HOSTS'] ?? false) {
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts(explode(',', $trustedHosts));
}