public/index.php line 34

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. use Symfony\Component\Debug\Debug;
  4. use Symfony\Component\HttpFoundation\Request;
  5. header('Access-Control-Allow-Origin: https://scanner.keoscx.com');
  6. header("Access-Control-Allow-Headers: *");
  7. header("Access-Control-Allow-Methods: *");
  8. header("Access-Control-Allow-Credentials: true");
  9. require dirname(__DIR__) . '/config/bootstrap.php';
  10. if ($_SERVER['APP_DEBUG']) {
  11.     // umask(0000);
  12.     // umask(0022);
  13.     umask(0027);
  14.     Debug::enable();
  15. }
  16. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  17.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  18. }
  19. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  20.     Request::setTrustedHosts([$trustedHosts]);
  21. }
  22. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  23. $request Request::createFromGlobals();
  24. $response $kernel->handle($request);
  25. $response->send();
  26. $kernel->terminate($request$response);