diff --git a/Lombiq.HelpfulLibraries.AspNetCore/Security/ApplicationBuilderExtensions.cs b/Lombiq.HelpfulLibraries.AspNetCore/Security/ApplicationBuilderExtensions.cs index 01c6f555..1f6dcef5 100644 --- a/Lombiq.HelpfulLibraries.AspNetCore/Security/ApplicationBuilderExtensions.cs +++ b/Lombiq.HelpfulLibraries.AspNetCore/Security/ApplicationBuilderExtensions.cs @@ -62,7 +62,7 @@ public static IApplicationBuilder UseContentSecurityPolicyHeader(this IApplicati /// than early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than /// performing MIME-sniffing. /// - public static IApplicationBuilder UseContentTypeOptionsHeader(this IApplicationBuilder app) => + public static IApplicationBuilder UseNosniffContentTypeOptionsHeader(this IApplicationBuilder app) => app.Use(async (context, next) => { const string key = "X-Content-Type-Options"; diff --git a/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs b/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs index d5dd1a3a..c5e4f8c1 100644 --- a/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs +++ b/Lombiq.HelpfulLibraries.OrchardCore/Security/OrchardCoreBuilderExtensions.cs @@ -56,7 +56,7 @@ public static OrchardCoreBuilder ConfigureSecurityDefaults(this OrchardCoreBuild services => services.AddAntiClickjackingContentSecurityPolicyProvider(), app => app .UseContentSecurityPolicyHeader(allowInline: true) - .UseContentTypeOptionsHeader(), + .UseNosniffContentTypeOptionsHeader(), order: 99); return builder .ConfigureAntiForgeryAlwaysSecure()