mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Rename More Sonarr References
This commit is contained in:
parent
f69559e4da
commit
5003cd8a14
31 changed files with 108 additions and 113 deletions
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using Nancy;
|
||||
using Nancy.Bootstrapper;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
namespace Lidarr.Http.Extensions.Pipelines
|
||||
{
|
||||
public class LidarrVersionPipeline : IRegisterNancyPipeline
|
||||
{
|
||||
public int Order => 0;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
pipelines.AfterRequest.AddItemToStartOfPipeline((Action<NancyContext>) Handle);
|
||||
}
|
||||
|
||||
private void Handle(NancyContext context)
|
||||
{
|
||||
if (!context.Response.Headers.ContainsKey("X-ApplicationVersion"))
|
||||
{
|
||||
context.Response.Headers.Add("X-ApplicationVersion", BuildInfo.Version.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue