Class ContentSecurityPolicyDirective
Represents a base for all directives in a Content Security Policy.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Http.Headers
Assembly: IRM.AspNetCore.Mvc.dll
Syntax
public abstract class ContentSecurityPolicyDirective
Constructors
ContentSecurityPolicyDirective(String)
Creates a new instance of ContentSecurityPolicyDirective.
Declaration
protected ContentSecurityPolicyDirective(string directiveName)
Parameters
String
directiveName
The name of the directive. |
Methods
GetDirective(IContentSecurityPolicyNonceService)
Gets the directive with its valid sources, or an empty string.
Declaration
public virtual string GetDirective(IContentSecurityPolicyNonceService nonceService)
Parameters
IContentSecurityPolicyNonceService
nonceService
The service used to create a nonce per request. |
Returns
String
The directive with its valid sources, or an empty string. |
GetParts(IContentSecurityPolicyNonceService)
Gets all part strings that should be in the directive.
Declaration
protected abstract ICollection<string> GetParts(IContentSecurityPolicyNonceService nonceService)
Parameters
IContentSecurityPolicyNonceService
nonceService
The service used to create a nonce per request. |
Returns
System.Collections.Generic.ICollection<String>
A collection of source strings. |