You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
751 B

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