Use a more descriptive middleware name
This commit is contained in:
parent
b66abf0556
commit
69d581033b
|
@ -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>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue
Block a user