Support for X-Forwarded-For
-
Since REMOTE_ADDR is only available for direct connections and not on proxies, could you perhaps add support for X_FORWARDED_FOR headers? Something like below would work:
function($user_login, $user) { $ip = ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') ? $_SERVER['REMOTE_ADDR'] : $_SERVER['X_FORWARDED_FOR']; openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH); syslog(LOG_INFO,"Accepted password for $user_login from {$ip}"); },10,2);
Thanks. ??
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Support for X-Forwarded-For’ is closed to new replies.