public/index.php line 5

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. if ($_SERVER['APP_ENV'] === 'staging') {
  6. if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'http')) {
  7. $_SERVER['HTTPS'] = 'on';
  8. $_SERVER['SERVER_PORT'] = 443;
  9. }
  10. }
  11. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  12. };