mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed: Correct User-Agent api logging
This commit is contained in:
parent
90fb1a02c4
commit
a40f537004
1 changed files with 2 additions and 2 deletions
|
@ -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"]}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue