--- akismet.php 2013/04/01 14:50:01 1.1 +++ akismet.php 2013/04/01 14:52:47 @@ -319,9 +319,11 @@ function akismet_auto_check_comment( $commentdata ) { global $akismet_api_host, $akismet_api_port, $akismet_last_comment; + $local_headers = apache_request_headers(); $comment = $commentdata; - $comment['user_ip'] = $_SERVER['REMOTE_ADDR']; + #$comment['user_ip'] = $_SERVER['REMOTE_ADDR']; + $comment['user_ip'] = $local_headers['X-Forwarded-For']; $comment['user_agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null; $comment['referrer'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null; $comment['blog'] = get_option('home');