mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-21 22:05:43 -04:00
Auto reload when server has been updated
New: Updating will reload UI on navigation
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Owin;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using Owin;
|
||||
|
||||
namespace NzbDrone.Host.Owin.MiddleWare
|
||||
{
|
||||
public class NzbDroneVersionMiddleWare : IOwinMiddleWare
|
||||
{
|
||||
public int Order { get { return 0; } }
|
||||
|
||||
public void Attach(IAppBuilder appBuilder)
|
||||
{
|
||||
appBuilder.Use(typeof (AddApplicationVersionHeader));
|
||||
}
|
||||
}
|
||||
|
||||
public class AddApplicationVersionHeader : OwinMiddleware
|
||||
{
|
||||
public AddApplicationVersionHeader(OwinMiddleware next)
|
||||
: base(next)
|
||||
{
|
||||
}
|
||||
|
||||
public override Task Invoke(OwinRequest request, OwinResponse response)
|
||||
{
|
||||
response.AddHeader("X-ApplicationVersion", BuildInfo.Version.ToString());
|
||||
|
||||
return Next.Invoke(request, response);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user