diff --git a/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs b/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs index 83675bf2b..2598cec6f 100644 --- a/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs @@ -22,7 +22,6 @@ public sealed class CachingKeysMiddleware { this.cachingOptions = cachingOptions.Value; this.cachingManager = cachingManager; - this.next = next; } diff --git a/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs b/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs index eba1e9c56..58a3ee789 100644 --- a/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs @@ -15,42 +15,37 @@ namespace Squidex.Web.Pipeline; public sealed class RequestLogPerformanceMiddleware { - private readonly RequestLogOptions requestLogOptions; private readonly RequestDelegate next; - public RequestLogPerformanceMiddleware(RequestDelegate next, IOptions requestLogOptions) + public RequestLogPerformanceMiddleware(RequestDelegate next) { - this.requestLogOptions = requestLogOptions.Value; - this.next = next; } - public async Task InvokeAsync(HttpContext context, ISemanticLog log) + public async Task InvokeAsync(HttpContext context, ISemanticLog log, IOptions requestLogOptions) { - if (requestLogOptions.LogRequests) + if (!requestLogOptions.Value.LogRequests) { - var watch = ValueStopwatch.StartNew(); - - try - { - await next(context); - } - finally - { - var elapsedMs = watch.Stop(); - - log.LogInformation((elapsedMs, context), (ctx, w) => - { - w.WriteProperty("message", "HTTP request executed."); - w.WriteProperty("elapsedRequestMs", ctx.elapsedMs); - w.WriteObject("filters", ctx.context, LogFilters); - }); - } + await next(context); + return; } - else + + var watch = ValueStopwatch.StartNew(); + try { await next(context); } + finally + { + var elapsedMs = watch.Stop(); + + log.LogInformation((elapsedMs, context), (ctx, w) => + { + w.WriteProperty("message", "HTTP request executed."); + w.WriteProperty("elapsedRequestMs", ctx.elapsedMs); + w.WriteObject("filters", ctx.context, LogFilters); + }); + } } private static void LogFilters(HttpContext httpContext, IObjectWriter obj) diff --git a/backend/src/Squidex/Areas/IdentityServer/Config/DynamicApplicationStore.cs b/backend/src/Squidex/Areas/IdentityServer/Config/DynamicApplicationStore.cs index 10f0b79e2..0a5bb1395 100644 --- a/backend/src/Squidex/Areas/IdentityServer/Config/DynamicApplicationStore.cs +++ b/backend/src/Squidex/Areas/IdentityServer/Config/DynamicApplicationStore.cs @@ -140,8 +140,6 @@ public class DynamicApplicationStore : InMemoryApplicationStore private static IEnumerable<(string, OpenIddictApplicationDescriptor)> CreateStaticClients(IServiceProvider serviceProvider) { - var identityOptions = serviceProvider.GetRequiredService>().Value; - var urlGenerator = serviceProvider.GetRequiredService(); var frontendId = Constants.ClientFrontendId; @@ -207,6 +205,8 @@ public class DynamicApplicationStore : InMemoryApplicationStore Type = ClientTypes.Public }); + var identityOptions = serviceProvider.GetRequiredService>().Value; + if (!identityOptions.IsAdminClientConfigured()) { yield break; diff --git a/backend/src/Squidex/Startup.cs b/backend/src/Squidex/Startup.cs index 49aec6494..eab60729b 100644 --- a/backend/src/Squidex/Startup.cs +++ b/backend/src/Squidex/Startup.cs @@ -123,7 +123,6 @@ public sealed class Startup }); app.UseFrontend(); - app.UsePlugins(); } } diff --git a/backend/src/Squidex/wwwroot/client-callback-popup.html b/backend/src/Squidex/wwwroot/client-callback-popup.html index b9facddf6..836ae241c 100644 --- a/backend/src/Squidex/wwwroot/client-callback-popup.html +++ b/backend/src/Squidex/wwwroot/client-callback-popup.html @@ -4,12 +4,13 @@ - + diff --git a/backend/src/Squidex/wwwroot/client-callback-silent.html b/backend/src/Squidex/wwwroot/client-callback-silent.html index bbb62d06a..96e6d47be 100644 --- a/backend/src/Squidex/wwwroot/client-callback-silent.html +++ b/backend/src/Squidex/wwwroot/client-callback-silent.html @@ -4,12 +4,13 @@ - + diff --git a/backend/src/Squidex/wwwroot/scripts/editor-json-schema.html b/backend/src/Squidex/wwwroot/scripts/editor-json-schema.html index 738423232..874e6b458 100644 --- a/backend/src/Squidex/wwwroot/scripts/editor-json-schema.html +++ b/backend/src/Squidex/wwwroot/scripts/editor-json-schema.html @@ -10,7 +10,7 @@ - +