Implement filelist and disable browser caching

This commit is contained in:
KZ
2015-08-11 23:10:15 +01:00
parent e007d321f6
commit c8dff6da72
13 changed files with 271 additions and 26 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http.Filters;
namespace Jackett
{
public class JackettAPINoCacheAttribute : System.Web.Http.Filters.ActionFilterAttribute
{
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
actionExecutedContext.Response.Headers.CacheControl = new System.Net.Http.Headers.CacheControlHeaderValue()
{
NoStore = true,
Private = true
};
base.OnActionExecuted(actionExecutedContext);
}
}
}