mirror of
https://github.com/Readarr/Readarr
synced 2025-12-12 03:13:54 +01:00
Fixed: Correct User-Agent api logging
(cherry picked from commit 5824ba963b480c920cee9d8ae6594c820167cd07)
This commit is contained in:
parent
fa68a9559f
commit
03d2a85821
1 changed files with 2 additions and 2 deletions
|
|
@ -79,13 +79,13 @@ private static string GetRequestPathAndQuery(HttpRequest request)
|
|||
|
||||
private static string GetOrigin(HttpContext context)
|
||||
{
|
||||
if (context.Request.Headers["UserAgent"].ToString().IsNullOrWhiteSpace())
|
||||
if (context.Request.Headers["User-Agent"].ToString().IsNullOrWhiteSpace())
|
||||
{
|
||||
return context.GetRemoteIP();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"{context.GetRemoteIP()} {context.Request.Headers["UserAgent"]}";
|
||||
return $"{context.GetRemoteIP()} {context.Request.Headers["User-Agent"]}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue