public/index.php line 25

Open in your IDE?
  1. <?php
  2. //die;
  3. use App\Kernel;
  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'] ?? false) {
  12.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_FOR Request::HEADER_X_FORWARDED_PORT Request::HEADER_X_FORWARDED_PROTO);
  13. }
  14. if ($trustedHosts $_SERVER['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);