mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-23 22:45:06 -04:00
Fixed: Real IP logging when IPv4 is mapped as IPv6
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user