Class ContentSecurityPolicyScriptSource
Represents the script-src of the Content Security Policy.
Inheritance
ContentSecurityPolicyScriptSource
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 ContentSecurityPolicyScriptSource : ContentSecurityPolicyUnsafeInlineSourceDirective
Constructors
ContentSecurityPolicyScriptSource()
Creates a new instance of ContentSecurityPolicyScriptSource.
Declaration
public ContentSecurityPolicyScriptSource()
Properties
AllowedHashSources
Gets or sets a collections of hash sources that loading resources from is allowed.
Declaration
public ICollection<ContentSecurityPolicyHashValue> AllowedHashSources { get; set; }
Property Value
System.Collections.Generic.ICollection<ContentSecurityPolicyHashValue>
|
AllowStrictDynamic
Gets or sets if the trust explicitly given to a script, by a nonce or a hash, shall be propagated to all scripts loaded by that root scripts.
Declaration
public bool AllowStrictDynamic { get; set; }
Property Value
Boolean
|
AllowUnsafeEval
Gets or sets if Eval() and similar methods for creating code from string is allowed.
Declaration
public bool AllowUnsafeEval { get; set; }
Property Value
Boolean
|
ReportSample
Gets or sets a sample of the violating code should be included in the violation report.
Declaration
public bool ReportSample { 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. |