Removed global setting of content model binder and used encoded URL in model binding exception filter redirect.

This commit is contained in:
Andy Butland
2020-05-15 10:33:09 +02:00
parent 22b7484217
commit 8ae0e12512
2 changed files with 2 additions and 8 deletions

View File

@@ -11,13 +11,10 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Web.BackOffice.AspNetCore;
using Umbraco.Web.Common.AspNetCore;
using Umbraco.Web.Common.Extensions;
using Umbraco.Web.Common.ModelBinders;
using Umbraco.Web.Website.AspNetCore;
using IHostingEnvironment = Umbraco.Core.Hosting.IHostingEnvironment;
namespace Umbraco.Web.UI.BackOffice
{
public class Startup
@@ -48,10 +45,7 @@ namespace Umbraco.Web.UI.BackOffice
services.AddUmbracoCore(_env, out var factory);
services.AddUmbracoWebsite();
services.AddMvc(options =>
{
options.ModelBinderProviders.Insert(0, new ContentModelBinderProvider());
});
services.AddMvc();
services.AddMiniProfiler(options =>
{
options.ShouldProfile = request => false; // WebProfiler determine and start profiling. We should not use the MiniProfilerMiddleware to also profile