public/index.php line 30

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. use Symfony\Component\Debug\Debug;
  4. use Symfony\Component\HttpFoundation\Request;
  5. require dirname(__DIR__) . '/config/bootstrap.php';
  6. if ($_SERVER['APP_DEBUG'])
  7. {
  8.     umask(0000);
  9.     Debug::enable();
  10. }
  11. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false)
  12. {
  13.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  14. }
  15. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false)
  16. {
  17.     Request::setTrustedHosts([$trustedHosts]);
  18. }
  19. $kernel   = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  20. $request  Request::createFromGlobals();
  21. $response $kernel->handle($request);
  22. $response->send();
  23. $kernel->terminate($request$response);