Don't let the event handlers kick in if Redirect Tracking is turned off in the config

This commit is contained in:
Sebastiaan Janssen
2016-08-05 11:41:08 +02:00
committed by GitHub
parent 9131b73cbb
commit 3ece30bd8b

View File

@@ -61,6 +61,9 @@ namespace Umbraco.Web.Redirects
/// <inheritdoc />
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (UmbracoConfig.For.UmbracoSettings().WebRouting.DisableRedirectUrlTracking) return;
// events are weird
// on 'published' we 'could' get the old or the new route depending on event handlers order
// so it is not reliable. getting the old route in 'publishing' to be sure and storing in http