|
|
|
@ -18,6 +18,13 @@ class mailu extends rcube_plugin
|
|
|
|
|
$args['action'] = 'login';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$ua = $_SERVER['HTTP_USER_AGENT'];
|
|
|
|
|
$ra = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
if ($ua == 'health' and ($ra == '127.0.0.1' or $ra == '::1')) {
|
|
|
|
|
print('OK');
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $args;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -59,13 +66,7 @@ class mailu extends rcube_plugin
|
|
|
|
|
|
|
|
|
|
function login_failed($args)
|
|
|
|
|
{
|
|
|
|
|
$ua = $_SERVER['HTTP_USER_AGENT'];
|
|
|
|
|
$ra = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
if ($ua == 'health' and ($ra == '127.0.0.1' or $ra == '::1')) {
|
|
|
|
|
print('OK');
|
|
|
|
|
} else {
|
|
|
|
|
header('Location: sso.php');
|
|
|
|
|
}
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|