Merge pull request #6789 from umbraco/v8/bugfix/6754-StatusCode-Skip-CustomErrors

fixes #6754 - skip custom errors when using StatusCodeFilterAttribute.
This commit is contained in:
Shannon Deminick
2019-10-21 16:17:27 +11:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
using System.Net;
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Web.Composing;
namespace Umbraco.Web.Mvc
{
@@ -20,6 +22,7 @@ namespace Umbraco.Web.Mvc
base.OnActionExecuted(filterContext);
filterContext.HttpContext.Response.StatusCode = (int)_statusCode;
filterContext.HttpContext.Response.TrySkipIisCustomErrors = Current.Configs.Settings().WebRouting.TrySkipIisCustomErrors;
}
}
}

View File

@@ -1,7 +1,6 @@
using System;
using System.Web;
using Umbraco.Core;
using Umbraco.Core.Collections;
using Umbraco.Core.Logging;
using Umbraco.Web.Composing;
using Umbraco.Web.Routing;
@@ -102,6 +101,5 @@ namespace Umbraco.Web
return end;
}
}
}