Merge branch 'v13/dev' into v13/feature/extension-model

# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Package/PackageControllerBase.cs
#	src/Umbraco.Cms.Api.Management/DependencyInjection/PackageBuilderExtensions.cs
#	src/Umbraco.Cms.Api.Management/ManagementApiComposer.cs
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/Serialization/ContextualJsonSerializer.cs
#	src/Umbraco.Web.BackOffice/CompatibilitySuppressions.xml
This commit is contained in:
kjac
2023-02-23 15:28:44 +01:00
282 changed files with 9387 additions and 1597 deletions

View File

@@ -31,6 +31,7 @@ using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Macros;
using Umbraco.Cms.Core.Net;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Persistence.Repositories;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Telemetry;
@@ -55,6 +56,7 @@ using Umbraco.Cms.Web.Common.Middleware;
using Umbraco.Cms.Web.Common.ModelBinders;
using Umbraco.Cms.Web.Common.Mvc;
using Umbraco.Cms.Web.Common.Profiler;
using Umbraco.Cms.Web.Common.Repositories;
using Umbraco.Cms.Web.Common.RuntimeMinification;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Cms.Web.Common.Templates;
@@ -109,7 +111,7 @@ public static partial class UmbracoBuilderExtensions
services.ConfigureOptions<ConfigureKestrelServerOptions>();
services.ConfigureOptions<ConfigureFormOptions>();
IProfiler profiler = GetWebProfiler(config);
IProfiler profiler = GetWebProfiler(config, httpContextAccessor);
services.AddLogger(webHostEnvironment, config);
@@ -201,15 +203,10 @@ public static partial class UmbracoBuilderExtensions
{
builder.Services.AddSingleton<WebProfilerHtml>();
builder.Services.AddMiniProfiler(options =>
{
// WebProfiler determine and start profiling. We should not use the MiniProfilerMiddleware to also profile
options.ShouldProfile = request => false;
builder.Services.AddMiniProfiler();
builder.Services.ConfigureOptions<ConfigureMiniProfilerOptions>();
// this is a default path and by default it performs a 'contains' check which will match our content controller
// (and probably other requests) and ignore them.
options.IgnoredPaths.Remove("/content/");
});
builder.Services.AddSingleton<IWebProfilerRepository, WebProfilerRepository>();
builder.AddNotificationHandler<UmbracoApplicationStartingNotification, InitializeWebProfiling>();
return builder;
@@ -386,7 +383,7 @@ public static partial class UmbracoBuilderExtensions
return builder;
}
private static IProfiler GetWebProfiler(IConfiguration config)
private static IProfiler GetWebProfiler(IConfiguration config, IHttpContextAccessor httpContextAccessor)
{
var isDebug = config.GetValue<bool>($"{Constants.Configuration.ConfigHosting}:Debug");
@@ -398,7 +395,7 @@ public static partial class UmbracoBuilderExtensions
return new NoopProfiler();
}
var webProfiler = new WebProfiler();
var webProfiler = new WebProfiler(httpContextAccessor);
webProfiler.StartBoot();
return webProfiler;