mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
parent
ab502ffda4
commit
efd9fe9ad0
@ -11,6 +11,7 @@ namespace Sonarr.Http.Extensions
|
|||||||
public static class ReqResExtensions
|
public static class ReqResExtensions
|
||||||
{
|
{
|
||||||
private static readonly NancyJsonSerializer NancySerializer = new NancyJsonSerializer();
|
private static readonly NancyJsonSerializer NancySerializer = new NancyJsonSerializer();
|
||||||
|
private static readonly string Expires = DateTime.UtcNow.AddYears(1).ToString("r");
|
||||||
|
|
||||||
public static readonly string LastModified = BuildInfo.BuildDateTime.ToString("r");
|
public static readonly string LastModified = BuildInfo.BuildDateTime.ToString("r");
|
||||||
|
|
||||||
@ -51,8 +52,8 @@ public static IDictionary<string, string> DisableCache(this IDictionary<string,
|
|||||||
|
|
||||||
public static IDictionary<string, string> EnableCache(this IDictionary<string, string> headers)
|
public static IDictionary<string, string> EnableCache(this IDictionary<string, string> headers)
|
||||||
{
|
{
|
||||||
headers["Cache-Control"] = "max-age=31536000 , public";
|
headers["Cache-Control"] = "max-age=31536000, public";
|
||||||
headers["Expires"] = "Sat, 29 Jun 2020 00:00:00 GMT";
|
headers["Expires"] = Expires;
|
||||||
headers["Last-Modified"] = LastModified;
|
headers["Last-Modified"] = LastModified;
|
||||||
headers["Age"] = "193266";
|
headers["Age"] = "193266";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user