Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.8 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.8 KB

Umbraco CSP (Content security policy) manager

Platform GitHub .NET

Enables you to manage Content Secuirty Policy (CSP) for both the front and back end, via CMS section.

Installation

dotnet add package Umbraco.Community.CSPManager

CSP Management

CSP Management section

Configuration

Configuration section

Evaluation

CSP Evaluation section

You will also need to give access via the users section to the CSP Manager section.

Nonce Tag Helper

To use CSP nonce you can make use of the Tag Helper.

First you will need to include the namespace in the ViewImports.cshtml

@addTagHelper *, Umbraco.Community.CSPManager

To use the nonce add the following to your <script> or <style> tags:

csp-manager-add-nonce="true"

When this is added it will include the nonce in the CSP header and output in the page.

If you need to access the nonce within a data attribute you can use the following:

csp-manager-add-nonce-data-attribute="true"