public/index.php line 49

Open in your IDE?
  1. <?php
  2. /*
  3.     if (isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW'])) {
  4.         if ($_SERVER['PHP_AUTH_USER'] == "ottcomputer" && $_SERVER['PHP_AUTH_PW'] == "OttC2k21") {
  5.         }else{
  6.             header('WWW-Authenticate: Basic realm="Mi dominio"');
  7.             header('HTTP/1.0 401 Unauthorized');
  8.             echo 'Unauthorized';
  9.             exit;
  10.         }
  11.     }else{
  12.         header('WWW-Authenticate: Basic realm="Mi dominio"');
  13.         header('HTTP/1.0 401 Unauthorized');
  14.         echo 'Unauthorized';
  15.         exit;
  16.     }
  17. */
  18. /*
  19. ini_set('display_errors', 1);
  20. error_reporting(E_ALL);
  21. /**/
  22. use App\Kernel;
  23. use Symfony\Component\Debug\Debug;
  24. use Symfony\Component\HttpFoundation\Request;
  25. require dirname(__DIR__).'/config/bootstrap.php';
  26. if ($_SERVER['APP_DEBUG']) {
  27.     umask(0000);
  28.     Debug::enable();
  29. }
  30. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  31.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  32. }
  33. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  34.     Request::setTrustedHosts([$trustedHosts]);
  35. }
  36. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  37. $request Request::createFromGlobals();
  38. $response $kernel->handle($request);
  39. $response->send();
  40. $kernel->terminate($request$response);