Umbraco.Community.CSPManager 1.4.1

dotnet add package Umbraco.Community.CSPManager --version 1.4.1                
NuGet\Install-Package Umbraco.Community.CSPManager -Version 1.4.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Umbraco.Community.CSPManager" Version="1.4.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Umbraco.Community.CSPManager --version 1.4.1                
#r "nuget: Umbraco.Community.CSPManager, 1.4.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Umbraco.Community.CSPManager as a Cake Addin
#addin nuget:?package=Umbraco.Community.CSPManager&version=1.4.1

// Install Umbraco.Community.CSPManager as a Cake Tool
#tool nuget:?package=Umbraco.Community.CSPManager&version=1.4.1                

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"
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.1 2,623 9/8/2024
1.4.0 201 8/23/2024
1.3.1-beta 314 5/2/2024
1.3.0-beta 155 4/5/2024
1.2.1 5,642 3/26/2024
1.2.0 6,828 10/26/2023
1.1.0-alpha 2,287 3/7/2023
1.0.1-alpha 295 1/11/2023
1.0.0-alpha 167 1/6/2023