Port v7@2aa0dfb2c5 - WIP

This commit is contained in:
Stephan
2018-03-20 18:21:37 +01:00
parent 8199b7710c
commit a9147f1473
31 changed files with 479 additions and 107 deletions

View File

@@ -40,13 +40,13 @@ namespace Umbraco.Core
var ipAddress = httpContext.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrEmpty(ipAddress))
return httpContext.Request.ServerVariables["REMOTE_ADDR"];
return httpContext.Request.UserHostAddress;
var addresses = ipAddress.Split(',');
if (addresses.Length != 0)
return addresses[0];
return httpContext.Request.ServerVariables["REMOTE_ADDR"];
return httpContext.Request.UserHostAddress;
}
catch (System.Exception ex)
{