Skip to content

Commit 7b659a7

Browse files
committed
handle * and ** for TRUSTED_PROXIES
1 parent 24650b6 commit 7b659a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/trustedproxy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
* how many proxies that client's request has
2525
* subsequently passed through.
2626
*/
27-
'proxies' => explode(',', env('TRUSTED_PROXIES', null)),
27+
'proxies' => in_array(env('TRUSTED_PROXIES', ['*', '**'])) ?
28+
env('TRUSTED_PROXIES') : explode(',', env('TRUSTED_PROXIES', null)),
2829

2930
/*
3031
* Or, to trust all proxies that connect

0 commit comments

Comments
 (0)