mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-20 13:17:17 +00:00
parent
95b52e630a
commit
453891e620
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using Sonarr.Http.Extensions;
|
||||
|
||||
namespace Sonarr.Http.Middleware
|
||||
{
|
||||
|
@ -19,7 +20,7 @@ namespace Sonarr.Http.Middleware
|
|||
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
if (!context.Response.Headers.ContainsKey(VERSIONHEADER))
|
||||
if (context.Request.IsApiRequest() && !context.Response.Headers.ContainsKey(VERSIONHEADER))
|
||||
{
|
||||
context.Response.Headers.Add(VERSIONHEADER, _version);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue