mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-21 03:12:55 +09:00
Add inRanges() and validateRanges() methods to IpFilter class
This commit is contained in:
parent
2effbea06f
commit
0adb13ca30
7 changed files with 52 additions and 77 deletions
|
|
@ -445,13 +445,9 @@ class Debug
|
|||
return $cache = true;
|
||||
|
||||
case 'ip':
|
||||
$allowed_ip = Config::get('debug.allow');
|
||||
foreach ($allowed_ip as $range)
|
||||
if (IpFilter::inRanges(RX_CLIENT_IP, Config::get('debug.allow')))
|
||||
{
|
||||
if (IpFilter::inRange(RX_CLIENT_IP, $range))
|
||||
{
|
||||
return $cache = true;
|
||||
}
|
||||
return $cache = true;
|
||||
}
|
||||
return $cache = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue