Fixed: Real IP logging when IPv4 is mapped as IPv6

pull/2406/head
Robin Dadswell 3 years ago committed by Qstick
parent 33409cf7bc
commit 782bdcc0a9

@ -156,6 +156,12 @@ namespace Lidarr.Http.Extensions
}
var remoteIP = request.HttpContext.Connection.RemoteIpAddress;
if (remoteIP.IsIPv4MappedToIPv6)
{
remoteIP = remoteIP.MapToIPv4();
}
var remoteAddress = remoteIP.ToString();
// Only check if forwarded by a local network reverse proxy

Loading…
Cancel
Save