Show / Hide Table of Contents

Class CspUnsafeInlineSourceDirectiveBuilder<TSourceDirective, TBuilder>

Represents all directive builders that configures ContentSecurityPolicyUnsafeInlineSourceDirective.

Inheritance
Object
CspDirectiveBuilder<TSourceDirective>
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>
CspUnsafeInlineSourceDirectiveBuilder<TSourceDirective, TBuilder>
CspScriptsBuilder
CspStyleBuilder
Inherited Members
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromNowhere()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromSelf()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.From(String)
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromAnywhere()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromAnywhereOverHttps()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromData()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromBlob()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromFilesystem()
CspSourceDirectiveBuilder<TSourceDirective, TBuilder>.FromMediastream()
CspDirectiveBuilder<TSourceDirective>.Directive
CspDirectiveBuilder<TSourceDirective>.Build()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Http.Headers.Builder
Assembly: IRM.AspNetCore.Mvc.dll
Syntax
public abstract class CspUnsafeInlineSourceDirectiveBuilder<TSourceDirective, TBuilder> : CspSourceDirectiveBuilder<TSourceDirective, TBuilder> where TSourceDirective : ContentSecurityPolicyUnsafeInlineSourceDirective, new()
    where TBuilder : CspUnsafeInlineSourceDirectiveBuilder<TSourceDirective, TBuilder>
Type Parameters
TSourceDirective

The type of directive that the implementation is building.

TBuilder

The actual implementation of this abstract class.

Methods

AddNonce()

Generates a random nonce for each request and adds it to the CSP header. Allows inline scripts/styles that have the nonce attribute set to the random value on the script/style element.

Declaration
public TBuilder AddNonce()
Returns
TBuilder

The builder for futher configuration.

AllowUnsafeInline()

Allow inline scripts. If you have an XSS vulnerability, this will allow them to execute. Cannot be enabled together with AddNonce.

Declaration
public TBuilder AllowUnsafeInline()
Returns
TBuilder

The builder for futher configuration.

Back to top Generated by DocFX