U4-8361 301 Url Tracking
Adds the ability to add certain headers to a PublishedContentRequest - these are internal for now until we're sure we want to expose them Adds response headers to tell browsers not to cache the 301 redirects so people can easily change their mind later
This commit is contained in:
@@ -323,6 +323,14 @@ namespace Umbraco.Web
|
||||
LogHelper.Debug<UmbracoModule>("Response status: Redirect={0}, Is404={1}, StatusCode={2}",
|
||||
() => pcr.IsRedirect ? (pcr.IsRedirectPermanent ? "permanent" : "redirect") : "none",
|
||||
() => pcr.Is404 ? "true" : "false", () => pcr.ResponseStatusCode);
|
||||
|
||||
response.Cache.SetCacheability(pcr.Cacheability);
|
||||
|
||||
foreach (var cacheExtension in pcr.CacheExtensions)
|
||||
response.Cache.AppendCacheExtension(cacheExtension);
|
||||
|
||||
foreach (var header in pcr.Headers)
|
||||
response.Cache.AppendCacheExtension(string.Format("{0}, {1}", header.Key, header.Value));
|
||||
|
||||
if (pcr.IsRedirect)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user