Title: HTTP_X_FORWARDED_FOR
Last modified: August 20, 2016

---

# HTTP_X_FORWARDED_FOR

 *  [jimbabwe](https://wordpress.org/support/users/jimbabwe/)
 * (@jimbabwe)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/http_x_forwarded_for/)
 * 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://wordpress.org/extend/plugins/contact-form-7/](http://wordpress.org/extend/plugins/contact-form-7/)

The topic ‘HTTP_X_FORWARDED_FOR’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [jimbabwe](https://wordpress.org/support/users/jimbabwe/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/http_x_forwarded_for/)
 * Status: not resolved