aboutsummaryrefslogtreecommitdiffhomepage
path: root/web/app_dev.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 08:30:07 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 08:30:07 +0100
commit93fd4692f6eb753cae16358131c8049d84cfbb41 (patch)
tree1ef2f66eb378cf419d1aa033a2c772539e60537d /web/app_dev.php
parent0440249631164a378981d014bf71b617c082bf5a (diff)
downloadwallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.gz
wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.zst
wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.zip
symfony is there
Diffstat (limited to 'web/app_dev.php')
-rw-r--r--web/app_dev.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/web/app_dev.php b/web/app_dev.php
new file mode 100644
index 00000000..e0279c2a
--- /dev/null
+++ b/web/app_dev.php
@@ -0,0 +1,30 @@
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
7// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
8//umask(0000);
9
10// 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.
12if (isset($_SERVER['HTTP_CLIENT_IP'])
13 || 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) {
16 header('HTTP/1.0 403 Forbidden');
17 exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
18}
19
20$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
21Debug::enable();
22
23require_once __DIR__.'/../app/AppKernel.php';
24
25$kernel = new AppKernel('dev', true);
26$kernel->loadClassCache();
27$request = Request::createFromGlobals();
28$response = $kernel->handle($request);
29$response->send();
30$kernel->terminate($request, $response);