diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-04 15:02:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-04 15:02:21 +0200 |
| commit | c124d025015ff03f474fc506855d2051e22db23f (patch) | |
| tree | eab02d0c1eb0e89e1c96ea89dc684df02d954b08 /Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs | |
| parent | 487d79f8acd5449c8c01d68b0df2caeb979213cc (diff) | |
| parent | 12b51cf2ba537a6f56882277dc856ab39ace94a0 (diff) | |
Merge pull request #10331 from barronpm/minor-cleanup
Diffstat (limited to 'Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs')
| -rw-r--r-- | Jellyfin.Api/Middleware/RobotsRedirectionMiddleware.cs | 3 |
1 files changed, 1 insertions, 2 deletions
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 /// <returns>The async task.</returns> 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"); |
