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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user