]>
Commit | Line | Data |
---|---|---|
93fd4692 NL |
1 | <?php |
2 | ||
93fd4692 | 3 | use Symfony\Component\Debug\Debug; |
6fc95673 | 4 | use Symfony\Component\HttpFoundation\Request; |
93fd4692 NL |
5 | |
6 | // If you don't want to setup permissions the proper way, just uncomment the following PHP line | |
6fc95673 | 7 | // read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup |
5c895a7f | 8 | // for more information |
93fd4692 NL |
9 | //umask(0000); |
10 | ||
11 | // This check prevents access to debug front controllers that are deployed by accident to production servers. | |
12 | // Feel free to remove this, extend it, or make something more sophisticated. | |
589dce52 NL |
13 | if (isset($_SERVER['HTTP_CLIENT_IP']) |
14 | || isset($_SERVER['HTTP_X_FORWARDED_FOR']) | |
6fc95673 | 15 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'], true) || PHP_SAPI === 'cli-server') |
589dce52 NL |
16 | ) { |
17 | header('HTTP/1.0 403 Forbidden'); | |
18 | exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); | |
19 | } | |
93fd4692 | 20 | |
6fc95673 | 21 | require __DIR__.'/../vendor/autoload.php'; |
93fd4692 NL |
22 | Debug::enable(); |
23 | ||
93fd4692 | 24 | $kernel = new AppKernel('dev', true); |
93fd4692 NL |
25 | $request = Request::createFromGlobals(); |
26 | $response = $kernel->handle($request); | |
27 | $response->send(); | |
28 | $kernel->terminate($request, $response); |