Class ContentSecurityPolicyUnsafeInlineSourceDirective
Represents a base for source directives that supports unsafe-inline, hash and nonce parts where the parts are one or more source.
Inheritance
ContentSecurityPolicyUnsafeInlineSourceDirective
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 ContentSecurityPolicyUnsafeInlineSourceDirective : ContentSecurityPolicySourceDirective
Constructors
ContentSecurityPolicyUnsafeInlineSourceDirective(String)
Creates a new instance of ContentSecurityPolicyUnsafeInlineSourceDirective.
Declaration
protected ContentSecurityPolicyUnsafeInlineSourceDirective(string directiveName)
Parameters
String
directiveName
The name of the directive. |
Properties
AddNonce
Gets or sets if a none source should be added to control that loading resources from is allowed.
Declaration
public bool AddNonce { get; set; }
Property Value
Boolean
|
AllowUnsafeInline
Gets or sets if inline resources, such as inline script elements, javascript: URL's, inline event handlers and inline style elements is allowed.
Declaration
public bool AllowUnsafeInline { get; set; }
Property Value
Boolean
|
Remarks
It is better to use AddNonce and/or
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. |