Skip to content

Commit

Permalink
The other way around.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Jan 7, 2024
1 parent 32b529e commit 42ffcb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static IApplicationBuilder UseContentSecurityPolicyHeader(
context.Response.OnStarting(async () =>
{
// No need to do content security policy on non-HTML responses.
if (context.Response.ContentType?.ContainsOrdinalIgnoreCase("text/html") == true) return;
if (context.Response.ContentType?.ContainsOrdinalIgnoreCase("text/html") != true) return;

// The thought behind this provider model is that if you need something else than the default, you should
// add a provider that only applies the additional directive on screens where it's actually needed. This way
Expand Down

0 comments on commit 42ffcb0

Please sign in to comment.