Commit fb2f4c3f authored by Ad Schellevis's avatar Ad Schellevis

(legacy) let's try not to overcomplicate that last thing....

parent 916868f8
...@@ -182,33 +182,26 @@ $userindex = index_users(); ...@@ -182,33 +182,26 @@ $userindex = index_users();
function isAuthLocalIP($http_host) function isAuthLocalIP($http_host)
{ {
global $config; global $config;
$local_ip = false;
$interface_list_ips = get_configured_ip_addresses(); $interface_list_ips = get_configured_ip_addresses();
foreach ($interface_list_ips as $ilips) { foreach ($interface_list_ips as $ilips) {
if (strcasecmp($http_host, $ilips) == 0) { if (strcasecmp($http_host, $ilips) == 0) {
$local_ip = true; return true;
break;
} }
} }
if (!$local_ip) { $interface_list_ipv6s = get_configured_ipv6_addresses();
$interface_list_ipv6s = get_configured_ipv6_addresses(); foreach ($interface_list_ipv6s as $ilipv6s) {
foreach ($interface_list_ipv6s as $ilipv6s) { if (strcasecmp($http_host, $ilipv6s) == 0) {
if (strcasecmp($http_host, $ilipv6s) == 0) { return true;
$local_ip = true;
break;
}
} }
if (!$local_ip) { }
if (isset($config['virtualip']['vip'])) { if (isset($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $vip) { foreach ($config['virtualip']['vip'] as $vip) {
if ($vip['subnet'] == $http_host) { if ($vip['subnet'] == $http_host) {
$local_ip = true; return true;
}
}
} }
} }
} }
return $local_ip; return false;
} }
function index_groups() function index_groups()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment