Skip to content

Commit

Permalink
These may be amended during program setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Dec 29, 2023
1 parent f60e643 commit 7651b15
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ namespace Lombiq.HelpfulLibraries.AspNetCore.Security;
/// </summary>
public class CdnContentSecurityPolicyProvider : IContentSecurityPolicyProvider
{
// These may be amended during program setup.
#pragma warning disable CA2227 // CA2227: Change 'PermittedStyleSources' to be read-only by removing the property setter
/// <summary>
/// Gets or sets the URLs whose <see cref="Uri.Host"/> will be added to the <see cref="StyleSrc"/> directive.
/// </summary>
Expand All @@ -30,6 +32,7 @@ public class CdnContentSecurityPolicyProvider : IContentSecurityPolicyProvider
{
new Uri("https://cdn.jsdelivr.net/npm"),
};
#pragma warning restore CA2227 // CA2227: Change 'PermittedStyleSources' to be read-only by removing the property setter

public ValueTask UpdateAsync(IDictionary<string, string> securityPolicies, HttpContext context)
{
Expand Down

0 comments on commit 7651b15

Please sign in to comment.