|
|
@ -79,13 +79,13 @@ namespace Lidarr.Http.Middleware
|
|
|
|
|
|
|
|
|
|
|
|
private static string GetOrigin(HttpContext context)
|
|
|
|
private static string GetOrigin(HttpContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (context.Request.Headers["UserAgent"].ToString().IsNullOrWhiteSpace())
|
|
|
|
if (context.Request.Headers["User-Agent"].ToString().IsNullOrWhiteSpace())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return context.GetRemoteIP();
|
|
|
|
return context.GetRemoteIP();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return $"{context.GetRemoteIP()} {context.Request.Headers["UserAgent"]}";
|
|
|
|
return $"{context.GetRemoteIP()} {context.Request.Headers["User-Agent"]}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|