summaryrefslogtreecommitdiff
path: root/classes/logger
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-01-05 10:17:24 +0300
committerAndrew Dolgov <[email protected]>2021-01-05 10:17:24 +0300
commita8302fb25316661512951fdf744ac1bae6e94ef6 (patch)
tree0f726961700794735328d35841c7f1e1ae98eb9c /classes/logger
parent87646621385686d6127f61a30ff71c5899d6a7a7 (diff)
use X-Real-IP headers if possible while authenticating
Diffstat (limited to 'classes/logger')
-rwxr-xr-xclasses/logger/sql.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/classes/logger/sql.php b/classes/logger/sql.php
index 1b44b1e5f..c1ea16ef9 100755
--- a/classes/logger/sql.php
+++ b/classes/logger/sql.php
@@ -16,7 +16,10 @@ class Logger_SQL {
$context = mb_substr($context, 0, 8192);
$server_params = [
- "IP" => "REMOTE_ADDR",
+ "Real IP" => "HTTP_X_REAL_IP",
+ "Forwarded For" => "HTTP_X_FORWARDED_FOR",
+ "Forwarded Protocol" => "HTTP_X_FORWARDED_PROTO",
+ "Remote IP" => "REMOTE_ADDR",
"Request URI" => "REQUEST_URI",
"User agent" => "HTTP_USER_AGENT",
];