diff --git a/Directory.Build.props b/Directory.Build.props index ff72da898..b54ae0dab 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 10.0.3 + 10.0.4 Piranha CMS Piranha CMS Copyright (c) .NET Foundation and Contributors diff --git a/core/Piranha.AspNetCore.Hosting/Extensions/PiranhaHostingExtensions.cs b/core/Piranha.AspNetCore.Hosting/Extensions/PiranhaHostingExtensions.cs index 73c1cce5c..4a06b79ee 100644 --- a/core/Piranha.AspNetCore.Hosting/Extensions/PiranhaHostingExtensions.cs +++ b/core/Piranha.AspNetCore.Hosting/Extensions/PiranhaHostingExtensions.cs @@ -50,6 +50,14 @@ public static IApplicationBuilder UsePiranha(this IApplicationBuilder builder, A options?.Invoke(applicationBuilder); + // Configure all registered endpoints + applicationBuilder.Builder.UseEndpoints(endpoints => + { + foreach (var endpoint in applicationBuilder.Endpoints) + { + endpoint.Invoke(endpoints); + } + }); return applicationBuilder.Builder; } @@ -75,7 +83,7 @@ public static WebApplication UsePiranha(this WebApplication app, Action - { + { foreach (var endpoint in application.Endpoints) { endpoint.Invoke(endpoints);