mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Cache is disabled for json responses.
This commit is contained in:
parent
b029195260
commit
642207c68d
5 changed files with 40 additions and 8 deletions
16
NzbDrone.Api/Extensions/CacheHeaderPipeline.cs
Normal file
16
NzbDrone.Api/Extensions/CacheHeaderPipeline.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using Nancy;
|
||||
|
||||
namespace NzbDrone.Api.Extensions
|
||||
{
|
||||
public static class CacheHeaderPipeline
|
||||
{
|
||||
public static void Handle(NancyContext context)
|
||||
{
|
||||
if (context.Response.ContentType.Contains("json"))
|
||||
{
|
||||
context.Response.Headers.DisableCache();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue