22 lines
535 B
C#
22 lines
535 B
C#
using System;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
namespace Jellyfin.Plugin.Seasonals;
|
|
|
|
/// <summary>
|
|
/// Startup filter to register the ScriptInjectionMiddleware.
|
|
/// </summary>
|
|
public class ScriptInjectionStartupFilter : IStartupFilter
|
|
{
|
|
/// <inheritdoc />
|
|
public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next)
|
|
{
|
|
return builder =>
|
|
{
|
|
builder.UseMiddleware<ScriptInjectionMiddleware>();
|
|
next(builder);
|
|
};
|
|
}
|
|
}
|