aboutsummaryrefslogtreecommitdiffhomepage
path: root/web/app_dev.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
commit1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch)
tree8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /web/app_dev.php
parent790573d45899504bdecd2573c8f64018e23b139e (diff)
parent131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff)
downloadwallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'web/app_dev.php')
-rw-r--r--web/app_dev.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/app_dev.php b/web/app_dev.php
index e0279c2a..8456754d 100644
--- a/web/app_dev.php
+++ b/web/app_dev.php
@@ -4,24 +4,26 @@ use Symfony\Component\HttpFoundation\Request;
4use Symfony\Component\Debug\Debug; 4use Symfony\Component\Debug\Debug;
5 5
6// If you don't want to setup permissions the proper way, just uncomment the following PHP line 6// If you don't want to setup permissions the proper way, just uncomment the following PHP line
7// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information 7// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
8// for more information
8//umask(0000); 9//umask(0000);
9 10
10// This check prevents access to debug front controllers that are deployed by accident to production servers. 11// This check prevents access to debug front controllers that are deployed by accident to production servers.
11// Feel free to remove this, extend it, or make something more sophisticated. 12// Feel free to remove this, extend it, or make something more sophisticated.
12if (isset($_SERVER['HTTP_CLIENT_IP']) 13if (isset($_SERVER['HTTP_CLIENT_IP'])
13 || isset($_SERVER['HTTP_X_FORWARDED_FOR']) 14 || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
14 || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server') 15 || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')
15) { 16) {
16 header('HTTP/1.0 403 Forbidden'); 17 header('HTTP/1.0 403 Forbidden');
17 exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); 18 exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
18} 19}
19 20
20$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; 21/**
22 * @var Composer\Autoload\ClassLoader $loader
23 */
24$loader = require __DIR__.'/../app/autoload.php';
21Debug::enable(); 25Debug::enable();
22 26
23require_once __DIR__.'/../app/AppKernel.php';
24
25$kernel = new AppKernel('dev', true); 27$kernel = new AppKernel('dev', true);
26$kernel->loadClassCache(); 28$kernel->loadClassCache();
27$request = Request::createFromGlobals(); 29$request = Request::createFromGlobals();