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(); } }