Fixed: Correct User-Agent api logging

This commit is contained in:
Qstick 2022-05-06 08:25:34 -05:00 committed by GitHub
parent 7f2d5d8d10
commit 5824ba963b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -79,13 +79,13 @@ namespace Radarr.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"]}";
}
}
}