From 47933d792862faf4fc4f318ce97f68afca8b2606 Mon Sep 17 00:00:00 2001 From: gavynd6 <95837055+gavynd6@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:22:10 +1300 Subject: [PATCH] fix: update ip_address protector to use request()->ips() --- src/Auth/Protect/Protectors/IpAddress.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Auth/Protect/Protectors/IpAddress.php b/src/Auth/Protect/Protectors/IpAddress.php index fb35a52fe1d..65abb296c5f 100644 --- a/src/Auth/Protect/Protectors/IpAddress.php +++ b/src/Auth/Protect/Protectors/IpAddress.php @@ -9,9 +9,11 @@ class IpAddress extends Protector { public function protect() { - $ips = Arr::get($this->config, 'allowed', []); + $allowed = Arr::get($this->config, 'allowed', []); - if (! in_array(request()->ip(), $ips)) { + $requestIps = request()->ips(); + + if (empty(array_intersect($requestIps, $allowed))) { throw new ForbiddenHttpException(); } }