Cache is disabled for json responses.

This commit is contained in:
Keivan Beigi 2013-07-25 14:57:11 -07:00
commit 642207c68d
5 changed files with 40 additions and 8 deletions

View 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();
}
}
}
}