Class ContentSecurityPolicyHeader
Represents the Content-Security-Policy HTTP header.
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 class ContentSecurityPolicyHeader : ISecurityHttpHeader, IHttpHeader
Remarks
For more information about the Content-Security-Policy HTTP header:
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
Constructors
ContentSecurityPolicyHeader(ContentSecurityPolicyConfiguration, IServiceProvider)
Creates a new instance of ContentSecurityPolicyHeader.
Declaration
public ContentSecurityPolicyHeader(ContentSecurityPolicyConfiguration configuration, IServiceProvider serviceProvider)
Parameters
ContentSecurityPolicyConfiguration
configuration
The ContentSecurityPolicyConfiguration containing the configuration of csp. |
System.IServiceProvider
serviceProvider
The System.IServiceProvider used to resolve an IContentSecurityPolicyNonceService if needed. |
Properties
Name
Gets the name of the HTTP header.
Declaration
public string Name { get; }
Property Value
String
|
Implements
Skip
Gets or sets if the security header should be skiped for a specific request.
Declaration
public bool Skip { get; set; }
Property Value
Boolean
|
Implements
Value
Gets the value of the HTTP header.
Declaration
public virtual StringValues Value { get; }
Property Value
StringValues
|