diff --git a/web/app_dev.php b/web/app_dev.php index 0ba2029..6b8d760 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -6,13 +6,7 @@ // this check prevents access to debug front controllers that are deployed by accident to production servers. // feel free to remove this, extend it, or make something more sophisticated. -if (!in_array(@$_SERVER['REMOTE_ADDR'], array( - '127.0.0.1', - '::1', -))) { - header('HTTP/1.0 403 Forbidden'); - exit('You (' . @$_SERVER['REMOTE_ADDR'] . ') are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); -} +require_once __DIR__.'/check_ip.php'; require_once __DIR__.'/../app/bootstrap.php.cache'; require_once __DIR__.'/../app/AppKernel.php'; diff --git a/web/check_ip.php b/web/check_ip.php new file mode 100644 index 0000000..7240642 --- /dev/null +++ b/web/check_ip.php @@ -0,0 +1,11 @@ +