Class ContentSecurityPolicySourceDirective
Represents a base for directives where the parts are one or more source.
Inherited Members
Namespace: IRM.AspNetCore.Http.Headers
Assembly: IRM.AspNetCore.Mvc.dll
Syntax
public abstract class ContentSecurityPolicySourceDirective : ContentSecurityPolicyDirective
Constructors
ContentSecurityPolicySourceDirective(String)
Creates a new instance of ContentSecurityPolicySourceDirective.
Declaration
protected ContentSecurityPolicySourceDirective(string directiveName)
Parameters
String
directiveName
The name of the directive. |
Properties
AllowAny
Gets or sets if loading the resources from any source ('*') is allowed.
Declaration
public bool AllowAny { get; set; }
Property Value
Boolean
|
AllowAnyOnlyHttps
Gets or sets if loading the resources from any source over https is allowed.
Declaration
public bool AllowAnyOnlyHttps { get; set; }
Property Value
Boolean
|
AllowBlobScheme
Gets or sets if loading the resource from blob: is allowed.
Declaration
public bool AllowBlobScheme { get; set; }
Property Value
Boolean
|
AllowDataScheme
Gets or sets if loading the reources from data: is allowed.
Declaration
public bool AllowDataScheme { get; set; }
Property Value
Boolean
|
AllowedSources
Gets or sets a collections of sources that loading resources from is allowed.
Declaration
public ICollection<string> AllowedSources { get; set; }
Property Value
System.Collections.Generic.ICollection<String>
|
AllowFilesystemScheme
Gets or sets if loading the resource from filesystem: is allowed.
Declaration
public bool AllowFilesystemScheme { get; set; }
Property Value
Boolean
|
AllowMediastreamScheme
Gets or sets if loading the resource from the mediastream: is allowed.
Declaration
public bool AllowMediastreamScheme { get; set; }
Property Value
Boolean
|
AllowNone
Gets or sets if all resources should be blocked.
Declaration
public bool AllowNone { get; set; }
Property Value
Boolean
|
AllowSelf
Gets or sets if loading the resources from the same domain as the page is allowed.
Declaration
public bool AllowSelf { get; set; }
Property Value
Boolean
|
Methods
GetParts(IContentSecurityPolicyNonceService)
Gets all source strings that should be in the *-src [source].
Declaration
protected override 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. |