From 03d2a858210dda1e5558584b6759b0a99b59df8c Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 6 May 2022 08:25:34 -0500 Subject: [PATCH] Fixed: Correct User-Agent api logging (cherry picked from commit 5824ba963b480c920cee9d8ae6594c820167cd07) --- src/Readarr.Http/Middleware/LoggingMiddleware.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Readarr.Http/Middleware/LoggingMiddleware.cs b/src/Readarr.Http/Middleware/LoggingMiddleware.cs index 0adf16af4..6d6bccd1b 100644 --- a/src/Readarr.Http/Middleware/LoggingMiddleware.cs +++ b/src/Readarr.Http/Middleware/LoggingMiddleware.cs @@ -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"]}"; } } }