From 3d5c8d14bd28a95e9d438479d6e1cd8991eb8d8a Mon Sep 17 00:00:00 2001 From: Boy132 Date: Mon, 21 Oct 2024 18:43:05 +0200 Subject: [PATCH] Add back `trustedproxy` config (#651) --- config/trustedproxy.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 config/trustedproxy.php diff --git a/config/trustedproxy.php b/config/trustedproxy.php new file mode 100644 index 0000000000..7e0166af8e --- /dev/null +++ b/config/trustedproxy.php @@ -0,0 +1,28 @@ +getClientIp() + * always gets the originating client IP, no matter + * how many proxies that client's request has + * subsequently passed through. + */ + 'proxies' => in_array(env('TRUSTED_PROXIES', []), ['*', '**']) ? + env('TRUSTED_PROXIES') : explode(',', env('TRUSTED_PROXIES') ?? ''), +];