The IP address being logged by Defender is the IP address of the load balancer, not the external user. We have this in wp-config.php:
// 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];
}
but it doesn’t appear to be working. Is there something else we need to do to get the IP address to be seen by the site?