diff --git a/src/app/Http/Middleware/TrustProxies.php b/src/app/Http/Middleware/TrustProxies.php index c1ee7619..34d7b58c 100644 --- a/src/app/Http/Middleware/TrustProxies.php +++ b/src/app/Http/Middleware/TrustProxies.php @@ -1,32 +1,20 @@ |string|null - */ - protected $proxies = [ - '10.0.0.0/8', - '127.0.0.1/8', - '172.16.0.0/12', - '192.168.0.0/16' - ]; - /** * The headers that should be used to detect proxies. * * @var int */ protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; } diff --git a/src/config/trustedproxy.php b/src/config/trustedproxy.php new file mode 100644 index 00000000..7ec66186 --- /dev/null +++ b/src/config/trustedproxy.php @@ -0,0 +1,5 @@ + env('TRUSTED_PROXIES', '10.0.0.0/8,127.0.0.1/8,172.16.0.0/12,192.168.0.0/16'), +];