From cfba7e21bdee5e756ab8765d4368c176ca4e63b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 29 Dec 2023 01:33:35 +0100 Subject: [PATCH] Fix ConfigureSecurityDefaults. --- .../Security/OrchardCoreBuilderExtensions.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs b/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs index 49e04a69..e7e99d3c 100644 --- a/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs +++ b/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs @@ -18,8 +18,11 @@ public static OrchardCoreBuilder ConfigureAntiForgeryAlwaysSecure(this OrchardCo /// Provides some default security configuration for Orchard Core. Use it in conjunction with . /// - public static OrchardCoreBuilder ConfigureSecurityDefaults(this OrchardCoreBuilder builder) => builder - .ConfigureServices(services => services.AddAntiClickjackingContentSecurityPolicyProvider()) - .ConfigureAntiForgeryAlwaysSecure() - .AddTenantFeatures("OrchardCore.Diagnostics"); + public static OrchardCoreBuilder ConfigureSecurityDefaults(this OrchardCoreBuilder builder) + { + builder.ApplicationServices.AddAntiClickjackingContentSecurityPolicyProvider(); + return builder + .ConfigureAntiForgeryAlwaysSecure() + .AddTenantFeatures("OrchardCore.Diagnostics"); + } }