mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-11 07:37:10 -07:00
Fixed: Real IP logging when IPv4 is mapped as IPv6
This commit is contained in:
parent
33409cf7bc
commit
782bdcc0a9
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue