Remove ContentFinderByRedirectUrl if RedirectUrlTracking is disabled (#7761)

This commit is contained in:
Marc Goodson
2020-05-25 16:51:52 +01:00
committed by GitHub
parent 4c16421cbb
commit b6262bf334

View File

@@ -179,7 +179,7 @@ namespace Umbraco.Web.Runtime
.Remove<TinyMceValueConverter>()
.Remove<TextStringValueConverter>()
.Remove<MarkdownEditorValueConverter>();
// add all known factories, devs can then modify this list on application
// startup either by binding to events or in their own global.asax
composition.FilteredControllerFactory()
@@ -203,8 +203,12 @@ namespace Umbraco.Web.Runtime
.Append<ContentFinderByUrl>()
.Append<ContentFinderByIdPath>()
//.Append<ContentFinderByUrlAndTemplate>() // disabled, this is an odd finder
.Append<ContentFinderByUrlAlias>()
.Append<ContentFinderByRedirectUrl>();
.Append<ContentFinderByUrlAlias>();
//only append ContentFinderByRedirectUrl if RedirectUrlTracking is not disabled
if (composition.Configs.Settings().WebRouting.DisableRedirectUrlTracking == false)
{
composition.ContentFinders().Append<ContentFinderByRedirectUrl>();
}
composition.RegisterUnique<ISiteDomainHelper, SiteDomainHelper>();