1
0
mirror of https://github.com/bitwarden/server synced 2025-12-17 08:43:27 +00:00

Just use HttpContext RemoteIpAddress to get IP

This commit is contained in:
Kyle Spearrin
2018-02-21 21:43:02 -05:00
parent 4d703541bd
commit 0b17f3823a
2 changed files with 0 additions and 19 deletions

View File

@@ -47,11 +47,6 @@ namespace Bit.Core
return null;
}
if(HttpContext.Request?.Headers?.TryGetValue("X-Forwarded-For", out StringValues forwardHeader) ?? false)
{
_ip = forwardHeader.FirstOrDefault()?.Trim();
}
if(string.IsNullOrWhiteSpace(_ip))
{
_ip = HttpContext.Connection?.RemoteIpAddress?.ToString();