Fixed: Real IP logging when IPv4 is mapped as IPv6

pull/82/head
Robin Dadswell 3 years ago committed by Qstick
parent 934e4f2814
commit 7711f5a407

@ -120,6 +120,12 @@ namespace Prowlarr.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