From 7b659a773ee2cff875d5d992e13d6c7ac38a10ae Mon Sep 17 00:00:00 2001 From: Jakob Schrettenbrunner Date: Thu, 2 Feb 2017 23:31:42 +0100 Subject: [PATCH] handle * and ** for TRUSTED_PROXIES --- config/trustedproxy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/trustedproxy.php b/config/trustedproxy.php index 2bf4cd02f..a1fac334a 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -24,7 +24,8 @@ return [ * how many proxies that client's request has * subsequently passed through. */ - 'proxies' => explode(',', env('TRUSTED_PROXIES', null)), + 'proxies' => in_array(env('TRUSTED_PROXIES', ['*', '**'])) ? + env('TRUSTED_PROXIES') : explode(',', env('TRUSTED_PROXIES', null)), /* * Or, to trust all proxies that connect