Skip to content

Commit

Permalink
Don't insert duplicate CSP header.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Jan 10, 2024
1 parent a26713a commit 6a373ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static IApplicationBuilder UseContentSecurityPolicyHeader(
}

var policy = string.Join("; ", securityPolicies.Select((key, value) => $"{key} {value}"));
context.Response.Headers.Add(key, policy);
context.Response.Headers[key] = policy;
});

await next();
Expand Down

0 comments on commit 6a373ce

Please sign in to comment.