You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Host/Owin/MiddleWare/NancyMiddleWare.cs

29 lines
750 B

using Nancy.Bootstrapper;
using Nancy.Owin;
using Owin;
namespace NzbDrone.Host.Owin.MiddleWare
{
public class NancyMiddleWare : IOwinMiddleWare
{
private readonly INancyBootstrapper _nancyBootstrapper;
public NancyMiddleWare(INancyBootstrapper nancyBootstrapper)
{
_nancyBootstrapper = nancyBootstrapper;
}
public int Order { get { return 1; } }
public void Attach(IAppBuilder appBuilder)
{
var options = new NancyOptions
{
Bootstrapper = _nancyBootstrapper,
PerformPassThrough = context => context.Request.Path.StartsWith("/signalr")
};
appBuilder.UseNancy(options);
}
}
}