public/index.php line 20

Open in your IDE?
  1. <?php
  2. if (function_exists('newrelic_set_appname')) {
  3.     newrelic_set_appname('Roviniete.ro');
  4. }
  5. use App\Kernel;
  6. use Symfony\Component\Debug\Debug;
  7. use Symfony\Component\HttpFoundation\Request;
  8. if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  9.     $_SERVER['REMOTE_ADDR'] = explode(','$_SERVER['HTTP_X_FORWARDED_FOR'])[0];
  10. }
  11. require dirname(__DIR__).'/config/bootstrap.php';
  12. if ($_SERVER['APP_DEBUG']) {
  13.     umask(0000);
  14.     Debug::enable();
  15. }
  16. ini_set('session.cookie_samesite''None');
  17. ini_set('session.cookie_secure''true');
  18. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  19.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  20. }
  21. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  22.     Request::setTrustedHosts([$trustedHosts]);
  23. }
  24. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  25. $request Request::createFromGlobals();
  26. $response $kernel->handle($request);
  27. $response->send();
  28. $kernel->terminate($request$response);