Use a more descriptive middleware name

This commit is contained in:
crobibero 2020-12-11 07:17:06 -07:00
parent b66abf0556
commit 69d581033b
2 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ namespace Jellyfin.Server.Extensions
/// <returns>The updated application builder.</returns>
public static IApplicationBuilder UsePathTrim(this IApplicationBuilder appBuilder)
{
return appBuilder.UseMiddleware<PathTrimMiddleware>();
return appBuilder.UseMiddleware<LegacyEmbyRouteRewriteMiddleware>();
}
}
}

View File

@ -8,22 +8,22 @@ namespace Jellyfin.Server.Middleware
/// <summary>
/// Removes /emby and /mediabrowser from requested route.
/// </summary>
public class PathTrimMiddleware
public class LegacyEmbyRouteRewriteMiddleware
{
private const string EmbyPath = "/emby";
private const string MediabrowserPath = "/mediabrowser";
private readonly RequestDelegate _next;
private readonly ILogger<PathTrimMiddleware> _logger;
private readonly ILogger<LegacyEmbyRouteRewriteMiddleware> _logger;
/// <summary>
/// Initializes a new instance of the <see cref="PathTrimMiddleware"/> class.
/// Initializes a new instance of the <see cref="LegacyEmbyRouteRewriteMiddleware"/> class.
/// </summary>
/// <param name="next">The next delegate in the pipeline.</param>
/// <param name="logger">The logger.</param>
public PathTrimMiddleware(
public LegacyEmbyRouteRewriteMiddleware(
RequestDelegate next,
ILogger<PathTrimMiddleware> logger)
ILogger<LegacyEmbyRouteRewriteMiddleware> logger)
{
_next = next;
_logger = logger;