public/index.php line 31

Open in your IDE?
  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['REMOTE_ADDR'] == '130.93.57.197') {
  7.     // phpinfo();exit();
  8.     // echo 'coucou';
  9. }
  10. if ($_SERVER['APP_DEBUG']) {
  11.     umask(0000);
  12.     Debug::enable();
  13. }
  14. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  15.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  16. }
  17. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  18.     Request::setTrustedHosts([$trustedHosts]);
  19. }
  20. $_SERVER['HTTPS'] = 'on';
  21. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  22. $request Request::createFromGlobals();
  23. $response $kernel->handle($request);
  24. $response->send();
  25. $kernel->terminate($request$response);