diff --git a/Bootstraps/Symfony.php b/Bootstraps/Symfony.php index c44d240..8ce1a4e 100644 --- a/Bootstraps/Symfony.php +++ b/Bootstraps/Symfony.php @@ -80,11 +80,11 @@ public function getApplication() $app->booted = true; }, $app); - if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : false) { + if ($trustedProxies = getenv('TRUSTED_PROXIES'])) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } - if ($trustedHosts = isset($_SERVER['TRUSTED_HOSTS']) ? $_SERVER['TRUSTED_HOSTS'] : false) { + if ($trustedHosts = getenv('TRUSTED_HOSTS'])) { Request::setTrustedHosts(explode(',', $trustedHosts)); }