mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
24 lines
663 B
C#
24 lines
663 B
C#
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);
|
|
}
|
|
}
|
|
}
|