camspiers/silverstripe-csp-logging

Logs CSP violations through a logger

Maintainers

👁 camspiers

Package info

github.com/camspiers/silverstripe-csp-logging

Type:silverstripe-module

pkg:composer/camspiers/silverstripe-csp-logging

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 3

dev-master 2014-02-08 10:44 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 4bcc1fac72af474978517ebf7def357ad3acd78b

  • Cam Spiers <camspiers.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-19 18:06:41 UTC


README

👁 Build Status

Allows the logging of CSP violations in SilverStripe

Installation (with composer)

composer require camspiers/silverstripe-csp-logging

Usage

Provide an instance of Psr\Log\LoggerInterface to the CSP controller:

  1. Create a file called mysite/_config/csp.yml and add your logging service to the controller
Injector:
 Camspiers\CSP\Controller:
 constructor:
 0: %$Monolog
  1. Set your Content-Security-Policy headers
  2. Add "report-uri /csp-report/;" to the Content-Security-Policy header to log violations through SilverStripe