settings->prometheus_allowed_ips)) { return $next($request); } $clientIp = $request->ip(); $allowedIps = $this->settings->prometheus_allowed_ips; foreach ($allowedIps as $allowedIp) { if (str_contains($allowedIp, '/')) { if (Network::ipInRange($clientIp, $allowedIp)) { return $next($request); } } elseif ($clientIp === $allowedIp) { return $next($request); } } abort(403); } }