···2233use Illuminate\Http\Request;
4455-$trustedProxies = presence(env('TRUSTED_PROXIES'));
66-if ($trustedProxies !== null && $trustedProxies !== '*') {
77- $trustedProxies = explode(',', $trustedProxies);
88-}
99-105return [
116127 /*
···1510 * Both IPv4 and IPv6 addresses are
1611 * supported, along with CIDR notation.
1712 *
1818- * The "*" character is syntactic sugar
1919- * within TrustedProxy to trust any proxy
2020- * that connects directly to your server,
2121- * a requirement when you cannot know the address
2222- * of your proxy (e.g. if using ELB or similar).
2323- *
1313+ * Use "0.0.0.0/0,::/0" to trust any proxy.
2414 */
2525- 'proxies' => $trustedProxies,
2626-2727- /*
2828- * To trust one or more specific proxies that connect
2929- * directly to your server, use an array or a string separated by comma of IP addresses:
3030- */
3131- // 'proxies' => ['192.168.1.1'],
3232- // 'proxies' => '192.168.1.1, 192.168.1.2',
3333-3434- /*
3535- * Or, to trust all proxies that connect
3636- * directly to your server, use a "*"
3737- */
3838- // 'proxies' => '*',
1515+ 'proxies' => explode(',', presence(env('TRUSTED_PROXIES')) ?? ''),
39164017 /*
4118 * Which headers to use to detect proxy related data (For, Host, Proto, Port)