• Running wordpress behind pound proxy. Contact Form 7 module special-mail-tags.php and akismet.php currently pull the proxy IP using the SERVER variable REMOTE_ADDR. When emails arrive with IP included using the wpcf7 routine, the proxy IP appears. This may impact the blacklist lookup?

    In my case, I can probably just tinker with the modules to set a variable using HTTP_X_FOWARDED_FOR, sort of hard-coding user_ip and replacing the $_SERVER[‘REMOTE_ADDR’] in the modules.

    However, maybe the routines should include a typical x-forwarded-for function:
    function getIP() {
    $ip;
    if (getenv(“HTTP_CLIENT_IP”))
    $ip = getenv(“HTTP_CLIENT_IP”);
    else if(getenv(“HTTP_X_FORWARDED_FOR”))
    $ip = getenv(“HTTP_X_FORWARDED_FOR”);
    else if(getenv(“REMOTE_ADDR”))
    $ip = getenv(“REMOTE_ADDR”);
    else
    $ip = “UNKNOWN”;
    return $ip;
    }

    Has anyone else done this?

    http://ww.wp.xz.cn/extend/plugins/contact-form-7/

The topic ‘HTTP_X_FORWARDED_FOR’ is closed to new replies.