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> /// <returns>The updated application builder.</returns>
public static IApplicationBuilder UsePathTrim(this IApplicationBuilder appBuilder) 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> /// <summary>
/// Removes /emby and /mediabrowser from requested route. /// Removes /emby and /mediabrowser from requested route.
/// </summary> /// </summary>
public class PathTrimMiddleware public class LegacyEmbyRouteRewriteMiddleware
{ {
private const string EmbyPath = "/emby"; private const string EmbyPath = "/emby";
private const string MediabrowserPath = "/mediabrowser"; private const string MediabrowserPath = "/mediabrowser";
private readonly RequestDelegate _next; private readonly RequestDelegate _next;
private readonly ILogger<PathTrimMiddleware> _logger; private readonly ILogger<LegacyEmbyRouteRewriteMiddleware> _logger;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PathTrimMiddleware"/> class. /// Initializes a new instance of the <see cref="LegacyEmbyRouteRewriteMiddleware"/> class.
/// </summary> /// </summary>
/// <param name="next">The next delegate in the pipeline.</param> /// <param name="next">The next delegate in the pipeline.</param>
/// <param name="logger">The logger.</param> /// <param name="logger">The logger.</param>
public PathTrimMiddleware( public LegacyEmbyRouteRewriteMiddleware(
RequestDelegate next, RequestDelegate next,
ILogger<PathTrimMiddleware> logger) ILogger<LegacyEmbyRouteRewriteMiddleware> logger)
{ {
_next = next; _next = next;
_logger = logger; _logger = logger;