Fixed: Correct User-Agent api logging

pull/2812/head v1.0.0.2570
Qstick 3 years ago committed by GitHub
parent 90fb1a02c4
commit a40f537004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save