12345678910111213141516171819202122232425262728293031 |
- <?php
- use Symfony\Component\Debug\Debug;
- use Symfony\Component\HttpFoundation\Request;
- if (isset($_SERVER['HTTP_CLIENT_IP'])
- || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
- || !(in_array(@$_SERVER['REMOTE_ADDR'], ['10.0.3.1','127.0.0.1', '::1'], true) || PHP_SAPI === 'cli-server')
- ) {
- header('HTTP/1.0 403 Forbidden');
- exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
- }
- require __DIR__.'/../vendor/autoload.php';
- Debug::enable();
- $kernel = new AppKernel('dev', true);
- if (PHP_VERSION_ID < 70000) {
- $kernel->loadClassCache();
- }
- $request = Request::createFromGlobals();
- $response = $kernel->handle($request);
- $response->send();
- $kernel->terminate($request, $response);
|