Search Results for

    Show / Hide Table of Contents
    View Source

    Class CspNonceInjectionOptions

    Options for CSP nonce injection middleware.

    Inheritance
    object
    Namespace: Umbraco.Cms.Web.Common.ApplicationBuilder
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public class CspNonceInjectionOptions

    Constructors

    View Source

    CspNonceInjectionOptions()

    Declaration
    public CspNonceInjectionOptions()

    Properties

    View Source

    Directive

    Gets or sets the CSP directive to inject the nonce into. Defaults to "script-src".

    Declaration
    public string Directive { get; set; }
    Property Value
    Type Description
    string
    View Source

    HeaderNames

    Gets or sets the CSP header names to modify. Defaults to both "Content-Security-Policy" and "Content-Security-Policy-Report-Only".

    Declaration
    public string[] HeaderNames { get; set; }
    Property Value
    Type Description
    string[]
    View Source

    ShouldApplyToRequest

    Gets or sets a function that determines whether the nonce should be injected for a given request. Defaults to injecting for all requests.

    Declaration
    public Func<HttpContext, bool> ShouldApplyToRequest { get; set; }
    Property Value
    Type Description
    Func<HttpContext, bool>
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX