diff --git a/app/config/app.php b/app/config/app.php index e671e6c82..9ca2cde36 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -136,6 +136,7 @@ return [ 'Jenssegers\Date\DateServiceProvider', 'McCool\LaravelAutoPresenter\LaravelAutoPresenterServiceProvider', 'PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider', + 'Fideloper\Proxy\ProxyServiceProvider', /* * Application Service Providers... diff --git a/app/config/packages/fideloper/proxy/config.php b/app/config/packages/fideloper/proxy/config.php new file mode 100644 index 000000000..8eec31911 --- /dev/null +++ b/app/config/packages/fideloper/proxy/config.php @@ -0,0 +1,51 @@ + '*' + | + | + | To trust only specific proxies (recommended), set an array of those + | proxies' IP addresses: + | + | 'proxies' => array('192.168.1.1', '192.168.1.2') + | + | + | Or use CIDR notation: + | + | 'proxies' => array('192.168.12.0/23') + | + */ + + 'proxies' => array( + '204.93.240.0', + '204.93.177.0', + '199.27.128.0', + '173.245.48.0', + '103.21.244.0', + '103.22.200.0', + '103.31.4.0', + '141.101.64.0', + '108.162.192.0', + '190.93.240.0', + '188.114.96.0', + '197.234.240.0', + '198.41.128.0', + '162.158.0.0', + '2400:cb00::', + '2606:4700::', + '2803:f800::', + '2405:b500::', + '2405:8100::', + ) + +); diff --git a/composer.json b/composer.json index 3d6d03e64..7fd611f7d 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "pragmarx/google2fa": "0.1.*", "roumen/feed": "2.8.*", "thujohn/rss": "1.0.*", - "watson/validating": "0.10.*" + "watson/validating": "0.10.*", + "fideloper/proxy": "~2.0" }, "require-dev": { "phpunit/phpunit": "~4.3", diff --git a/composer.lock b/composer.lock index 181a6d152..d8c86cb2e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "17e49b071003f48bf48a5d636ef0991d", + "hash": "7f388e67b62f93a2298f701f263b461c", "packages": [ { "name": "classpreloader/classpreloader", @@ -712,6 +712,53 @@ ], "time": "2015-01-10 13:53:42" }, + { + "name": "fideloper/proxy", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/fideloper/TrustedProxy.git", + "reference": "a0ec0f35c82dceecc0d8975f29e6e8e85acbd419" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a0ec0f35c82dceecc0d8975f29e6e8e85acbd419", + "reference": "a0ec0f35c82dceecc0d8975f29e6e8e85acbd419", + "shasum": "" + }, + "require": { + "illuminate/support": "~4.0|~5.0", + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-0": { + "Fideloper\\Proxy": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Fidao", + "email": "fideloper@gmail.com" + } + ], + "description": "Set trusted proxies for Laravel", + "keywords": [ + "load balancing", + "proxy", + "trusted proxy" + ], + "time": "2014-11-20 02:20:43" + }, { "name": "filp/whoops", "version": "1.1.3",