Skip to content

Adds a strict policy CSP header to Kirby projects.

License

Notifications You must be signed in to change notification settings

kenshodigital/kirby-csp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSP for Kirby

Adds a strict policy CSP header to Kirby projects.

General

Uses Kirby’s native nonce feature (used for the panel) to add a strict nonce-based content security policy header to all Kirby responses.

Installation

composer require kenshodigital/kirby-csp ^1.0

Usage

The plugin is not configurable and just follows the latest best practices.

However, scripts in your frontend are expected to include a nonce and the Kirby docs already provide a good example for this.

<script nonce="<?= $kirby->nonce() ?>"></script>