You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-15 01:24:34 +02:00
fixed health check
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user