TrustProxies natively supports , strings

pull/1941/head
asonix 2020-01-16 23:34:10 -06:00
rodzic cb6e8a4eaa
commit 64af65e992
1 zmienionych plików z 1 dodań i 9 usunięć

Wyświetl plik

@ -1,13 +1,5 @@
<?php <?php
$proxyString = env('TRUST_PROXIES', '');
if ($proxyString == '*' || $proxyString == '**') {
$proxies = $proxyString;
} else {
$proxies = explode(',', $proxyString);
}
return [ return [
/* /*
* Set trusted proxy IP addresses. * Set trusted proxy IP addresses.
@ -31,5 +23,5 @@ return [
* how many proxies that client's request has * how many proxies that client's request has
* subsequently passed through. * subsequently passed through.
*/ */
'proxies' => $proxies, 'proxies' => env('TRUST_PROXIES', ''),
]; ];