| @@ 13-19 (lines=7) @@ | ||
| 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. |
|
| 13 | if (isset($_SERVER['HTTP_CLIENT_IP']) |
|
| 14 | || isset($_SERVER['HTTP_X_FORWARDED_FOR']) |
|
| 15 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']) || php_sapi_name() === 'cli-server') |
|
| 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 | } |
|
| 20 | ||
| 21 | /** @var \Composer\Autoload\ClassLoader $loader */ |
|
| 22 | $loader = require __DIR__.'/../app/autoload.php'; |
|
| @@ 13-19 (lines=7) @@ | ||
| 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. |
|
| 13 | if (isset($_SERVER['HTTP_CLIENT_IP']) |
|
| 14 | || isset($_SERVER['HTTP_X_FORWARDED_FOR']) |
|
| 15 | || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']) || php_sapi_name() === 'cli-server') |
|
| 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 | } |
|
| 20 | ||
| 21 | /** @var \Composer\Autoload\ClassLoader $loader */ |
|
| 22 | $loader = require __DIR__.'/../app/autoload.php'; |
|