[Defender Pro] X-Forwarded For HTTP


This usually happens if your wordpress, or web server is behind a firewall and only has a Local IP (does not have a Public IP ), so that every visitor will pass through the firewall, and it is the Local IP firewall that is detected by WordPress.

To find out the visitor’s Public IP , X-Forwarded -For HTTP is needed, it can be seen at https://gist.github.com/ryanjbonnell/9509696

Code in wp-config:

// Use X-Forwarded-For HTTP Header to Get Visitor’s Real IP Address

if ( isset( $_SERVER[‘HTTP_X_FORWARDED_FOR’] ) ) {
$http_x_headers = explode( ‘,’, $_SERVER[‘HTTP_X_FORWARDED_FOR’] );

$_SERVER[‘REMOTE_ADDR’] = $http_x_headers[0];

Please add this feature in Defender Pro, so I dont put that code manually in wp-config.

the other plugin who has this feature is https://id.wordpress.org/plugins/loginizer/