4 use Symfony\Component\Debug\Debug
;
5 use Symfony\Component\HttpFoundation\Request
;
7 require dirname(__DIR__
).'/config/bootstrap.php';
9 if ($_SERVER['APP_DEBUG']) {
15 if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
16 Request
::setTrustedProxies(explode(',', $trustedProxies), Request
::HEADER_X_FORWARDED_ALL ^ Request
::HEADER_X_FORWARDED_HOST
);
19 if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
20 Request
::setTrustedHosts([$trustedHosts]);
23 $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
24 $request = Request
::createFromGlobals();
25 $response = $kernel->handle($request);
27 $kernel->terminate($request, $response);