Hi,
I need to implement XFF for my website. Below is the instruction. Can you guide me how to put this config?
To implement XFF for WordPress sites, simply copy and paste the code below to your theme’s wp-config.php file:
// 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];
}
Thanks,
Michael