Fixed: Correct User-Agent api logging

(cherry picked from commit 5824ba963b480c920cee9d8ae6594c820167cd07)
pull/1676/head
Qstick 3 years ago
parent fa68a9559f
commit 03d2a85821

@ -79,13 +79,13 @@ namespace Readarr.Http.Middleware
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…
Cancel
Save