mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 13:24:22 +00:00
@@ -53,7 +53,8 @@ class Logging {
|
||||
if (LOG_LOGIN) {
|
||||
|
||||
if (empty($ip)) {
|
||||
$ip = $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';
|
||||
// proxy-aware (issue #185): real client IP behind a trusted reverse proxy
|
||||
$ip = \App\Utils\IpResolver::getClientIp() ?? ($_SERVER['REMOTE_ADDR'] ?? '0.0.0.0');
|
||||
}
|
||||
|
||||
list($ip) = $database->escape_input($ip);
|
||||
|
||||
Reference in New Issue
Block a user