]> git.immae.eu Git - github/wallabag/wallabag.git/blame - web/app_dev.php
Fix documentation wording for matches/notmatches tagging rules
[github/wallabag/wallabag.git] / web / app_dev.php
CommitLineData
93fd4692
NL
1<?php
2
3use Symfony\Component\HttpFoundation\Request;
4use Symfony\Component\Debug\Debug;
5
6// If you don't want to setup permissions the proper way, just uncomment the following PHP line
5c895a7f
JB
7// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
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
13if (isset($_SERVER['HTTP_CLIENT_IP'])
14 || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
73cd160b 15 || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === '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
5c895a7f
JB
21/**
22 * @var Composer\Autoload\ClassLoader $loader
23 */
24$loader = require __DIR__.'/../app/autoload.php';
93fd4692
NL
25Debug::enable();
26
93fd4692
NL
27$kernel = new AppKernel('dev', true);
28$kernel->loadClassCache();
29$request = Request::createFromGlobals();
30$response = $kernel->handle($request);
31$response->send();
32$kernel->terminate($request, $response);