public/index.php line 16

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