mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Implement filelist and disable browser caching
This commit is contained in:
23
src/Jackett/CacheControlAttribute.cs
Normal file
23
src/Jackett/CacheControlAttribute.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user