mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-02-10 06:21:38 +00:00
[DockerApi] Rename DockerApi to Controller and add mailcow-adm tool
This commit is contained in:
@@ -488,6 +488,16 @@ function sys_mail($_data) {
|
||||
'msg' => 'Mass mail job completed, sent ' . count($rcpts) . ' mails'
|
||||
);
|
||||
}
|
||||
function get_remote_ip($use_x_real_ip = true) {
|
||||
$remote = $_SERVER['REMOTE_ADDR'];
|
||||
if ($use_x_real_ip && !empty($_SERVER['HTTP_X_REAL_IP'])) {
|
||||
$remote = $_SERVER['HTTP_X_REAL_IP'];
|
||||
}
|
||||
if (filter_var($remote, FILTER_VALIDATE_IP) === false) {
|
||||
$remote = '0.0.0.0';
|
||||
}
|
||||
return $remote;
|
||||
}
|
||||
function logger($_data = false) {
|
||||
/*
|
||||
logger() will be called as last function
|
||||
|
||||
Reference in New Issue
Block a user