mirror of
https://github.com/Mailu/Mailu.git
synced 2025-05-29 23:07:50 +02:00
repair failing health-check
This commit is contained in:
parent
5236196288
commit
cd17aa0c43
@ -55,4 +55,4 @@ VOLUME ["/data"]
|
|||||||
|
|
||||||
CMD /start.py
|
CMD /start.py
|
||||||
|
|
||||||
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
HEALTHCHECK CMD curl -f -L -H 'User-Agent: health' http://localhost/ || exit 1
|
||||||
|
@ -52,6 +52,12 @@ class mailu extends rcube_plugin
|
|||||||
}
|
}
|
||||||
function login_failed($args)
|
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')) {
|
||||||
|
echo "OK";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
header('Location: sso.php');
|
header('Location: sso.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user