From fa26bcde3a7b6c288ae5a528a45f08e64a6a2011 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Tue, 3 Oct 2023 09:29:06 -0400 Subject: Remove unnecessary ToString in RobotsRedirectionMiddleware --- Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs') diff --git a/Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs b/Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs index 8bf626035..acf3645fd 100644 --- a/Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs +++ b/Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs @@ -33,8 +33,7 @@ public class RobotsRedirectionMiddleware /// The async task. public async Task Invoke(HttpContext httpContext) { - var localPath = httpContext.Request.Path.ToString(); - if (string.Equals(localPath, "/robots.txt", StringComparison.OrdinalIgnoreCase)) + if (httpContext.Request.Path.Equals("/robots.txt", StringComparison.OrdinalIgnoreCase)) { _logger.LogDebug("Redirecting robots.txt request to web/robots.txt"); httpContext.Response.Redirect("web/robots.txt"); -- cgit v1.2.3