Check out example codes for "Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress". It will help you in understanding the concepts better.
Code Example 1
private string GetUserIP()
{
string ipList = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ipList))
{
return ipList.Split(',')[0];
}
return Request.ServerVariables["REMOTE_ADDR"];
}
Learn ReactJs, React Native from akashmittal.com