public/index.php line 26

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