U4-8938 [OutputCache] headers changed from Cache-Control: public to private
This commit is contained in:
@@ -589,13 +589,10 @@ namespace Umbraco.Web.Routing
|
||||
/// <summary>
|
||||
/// Gets or sets the <c>System.Web.HttpCacheability</c>
|
||||
/// </summary>
|
||||
/// <remarks>Is set to <c>System.Web.HttpCacheability.Private</c> by default, which is the ASP.NET default.</remarks>
|
||||
private HttpCacheability _cacheability = HttpCacheability.Private;
|
||||
internal HttpCacheability Cacheability
|
||||
{
|
||||
get { return _cacheability; }
|
||||
set { _cacheability = value; }
|
||||
}
|
||||
// Note: we used to set a default value here but that would then be the default
|
||||
// for ALL requests, we shouldn't overwrite it though if people are using [OutputCache] for example
|
||||
// see: https://our.umbraco.org/forum/using-umbraco-and-getting-started/79715-output-cache-in-umbraco-752
|
||||
internal HttpCacheability Cacheability { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of Extensions to append to the Response.Cache object
|
||||
|
||||
@@ -324,7 +324,8 @@ namespace Umbraco.Web
|
||||
() => pcr.IsRedirect ? (pcr.IsRedirectPermanent ? "permanent" : "redirect") : "none",
|
||||
() => pcr.Is404 ? "true" : "false", () => pcr.ResponseStatusCode);
|
||||
|
||||
response.Cache.SetCacheability(pcr.Cacheability);
|
||||
if(pcr.Cacheability != default(HttpCacheability))
|
||||
response.Cache.SetCacheability(pcr.Cacheability);
|
||||
|
||||
foreach (var cacheExtension in pcr.CacheExtensions)
|
||||
response.Cache.AppendCacheExtension(cacheExtension);
|
||||
|
||||
Reference in New Issue
Block a user