1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Upgraded to Owin 2.1.0

This commit is contained in:
kayone
2014-08-24 11:24:43 -07:00
parent 7e392e84a7
commit 3a90cc35c2
18 changed files with 181 additions and 109 deletions
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using NzbDrone.Common.EnvironmentInfo;
using Owin;
@@ -11,7 +12,7 @@ namespace NzbDrone.Host.Owin.MiddleWare
public void Attach(IAppBuilder appBuilder)
{
appBuilder.Use(typeof (AddApplicationVersionHeader));
appBuilder.Use(typeof(AddApplicationVersionHeader));
}
}
@@ -21,12 +22,10 @@ namespace NzbDrone.Host.Owin.MiddleWare
: base(next)
{
}
public override Task Invoke(OwinRequest request, OwinResponse response)
public override Task Invoke(IOwinContext context)
{
response.AddHeader("X-ApplicationVersion", BuildInfo.Version.ToString());
return Next.Invoke(request, response);
context.Response.Headers.Add("X-ApplicationVersion", new string[] { BuildInfo.Version.ToString() });
return Next.Invoke(context);
}
}
}