Could you please help me where to add the X-Forwarded-For code in the 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];
}
the wp-config.php file can be found in the Root folder of your Website. You will need to access this file using FTP or any file editor that your hosts server panel provides.
If you don’t know how to do this then speak with your Hosting provider