Moved development IP address list to dev-ips.php
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
45
.gitmodules
vendored
Normal file
45
.gitmodules
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
[submodule "vendor/symfony"]
|
||||
path = vendor/symfony
|
||||
url = http://github.com/symfony/symfony.git
|
||||
[submodule "vendor/twig"]
|
||||
path = vendor/twig
|
||||
url = http://github.com/fabpot/Twig.git
|
||||
[submodule "vendor/monolog"]
|
||||
path = vendor/monolog
|
||||
url = http://github.com/Seldaek/monolog.git
|
||||
[submodule "vendor/doctrine-common"]
|
||||
path = vendor/doctrine-common
|
||||
url = http://github.com/doctrine/common.git
|
||||
[submodule "vendor/doctrine-dbal"]
|
||||
path = vendor/doctrine-dbal
|
||||
url = http://github.com/doctrine/dbal.git
|
||||
[submodule "vendor/doctrine"]
|
||||
path = vendor/doctrine
|
||||
url = http://github.com/doctrine/doctrine2.git
|
||||
[submodule "vendor/swiftmailer"]
|
||||
path = vendor/swiftmailer
|
||||
url = http://github.com/swiftmailer/swiftmailer.git
|
||||
[submodule "vendor/assetic"]
|
||||
path = vendor/assetic
|
||||
url = http://github.com/kriswallsmith/assetic.git
|
||||
[submodule "vendor/twig-extensions"]
|
||||
path = vendor/twig-extensions
|
||||
url = http://github.com/fabpot/Twig-extensions.git
|
||||
[submodule "vendor/metadata"]
|
||||
path = vendor/metadata
|
||||
url = http://github.com/schmittjoh/metadata.git
|
||||
[submodule "vendor/bundles/Sensio/Bundle/FrameworkExtraBundle"]
|
||||
path = vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
|
||||
url = http://github.com/sensio/SensioFrameworkExtraBundle.git
|
||||
[submodule "vendor/bundles/JMS/SecurityExtraBundle"]
|
||||
path = vendor/bundles/JMS/SecurityExtraBundle
|
||||
url = http://github.com/schmittjoh/JMSSecurityExtraBundle.git
|
||||
[submodule "vendor/bundles/Sensio/Bundle/DistributionBundle"]
|
||||
path = vendor/bundles/Sensio/Bundle/DistributionBundle
|
||||
url = http://github.com/sensio/SensioDistributionBundle.git
|
||||
[submodule "vendor/bundles/Sensio/Bundle/GeneratorBundle"]
|
||||
path = vendor/bundles/Sensio/Bundle/GeneratorBundle
|
||||
url = http://github.com/sensio/SensioGeneratorBundle.git
|
||||
[submodule "vendor/bundles/Symfony/Bundle/AsseticBundle"]
|
||||
path = vendor/bundles/Symfony/Bundle/AsseticBundle
|
||||
url = http://github.com/symfony/AsseticBundle.git
|
1
vendor/assetic
vendored
Submodule
1
vendor/assetic
vendored
Submodule
Submodule vendor/assetic added at d6f89a3170
1
vendor/bundles/JMS/SecurityExtraBundle
vendored
Submodule
1
vendor/bundles/JMS/SecurityExtraBundle
vendored
Submodule
Submodule vendor/bundles/JMS/SecurityExtraBundle added at b564463433
1
vendor/bundles/Sensio/Bundle/DistributionBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/DistributionBundle
vendored
Submodule
Submodule vendor/bundles/Sensio/Bundle/DistributionBundle added at 7d75b222c8
1
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
vendored
Submodule
Submodule vendor/bundles/Sensio/Bundle/FrameworkExtraBundle added at e00b525b14
1
vendor/bundles/Sensio/Bundle/GeneratorBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/GeneratorBundle
vendored
Submodule
Submodule vendor/bundles/Sensio/Bundle/GeneratorBundle added at 55ad81e65a
1
vendor/bundles/Symfony/Bundle/AsseticBundle
vendored
Submodule
1
vendor/bundles/Symfony/Bundle/AsseticBundle
vendored
Submodule
Submodule vendor/bundles/Symfony/Bundle/AsseticBundle added at ca447e29f8
1
vendor/doctrine
vendored
Submodule
1
vendor/doctrine
vendored
Submodule
Submodule vendor/doctrine added at 91ffd30f52
1
vendor/doctrine-common
vendored
Submodule
1
vendor/doctrine-common
vendored
Submodule
Submodule vendor/doctrine-common added at 80838882ab
1
vendor/doctrine-dbal
vendored
Submodule
1
vendor/doctrine-dbal
vendored
Submodule
Submodule vendor/doctrine-dbal added at 2cac730bf4
1
vendor/metadata
vendored
Submodule
1
vendor/metadata
vendored
Submodule
Submodule vendor/metadata added at dbfbb15b3f
1
vendor/monolog
vendored
Submodule
1
vendor/monolog
vendored
Submodule
Submodule vendor/monolog added at da33c84d07
1
vendor/swiftmailer
vendored
Submodule
1
vendor/swiftmailer
vendored
Submodule
Submodule vendor/swiftmailer added at d33d54cc8a
1
vendor/symfony
vendored
Submodule
1
vendor/symfony
vendored
Submodule
Submodule vendor/symfony added at 7c91ee5755
1
vendor/twig
vendored
Submodule
1
vendor/twig
vendored
Submodule
Submodule vendor/twig added at 4c9e394c38
1
vendor/twig-extensions
vendored
Submodule
1
vendor/twig-extensions
vendored
Submodule
Submodule vendor/twig-extensions added at feb6d3f10c
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
require 'dev-ips.php';
|
||||
|
||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
//umask(0000);
|
||||
@@ -8,10 +10,7 @@
|
||||
// feel free to remove this, extend it, or make something more sophisticated.
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
|| !in_array(@$_SERVER['REMOTE_ADDR'], array(
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
))
|
||||
|| !in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips)
|
||||
) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
||||
|
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
require 'dev-ips.php';
|
||||
|
||||
if (!isset($_SERVER['HTTP_HOST'])) {
|
||||
exit('This script cannot be run from the CLI. Run it from a browser.');
|
||||
}
|
||||
|
||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
))) {
|
||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips)) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
exit('This script is only accessible from localhost.');
|
||||
}
|
||||
|
6
web/dev-ips.php
Normal file
6
web/dev-ips.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$dev_ips = array(
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
);
|
||||
|
Reference in New Issue
Block a user