silverstripe-module silverstripe-csp-logging
Logs CSP violations through a logger
camspiers/silverstripe-csp-logging
Logs CSP violations through a logger
- Saturday, February 8, 2014
- by camspiers
- Repository
- 1 Watchers
- 1 Stars
- 3 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 3 Open issues
- 1 Versions
- 0 % Grown
SilverStripe Content-Security-Policy Logging
, (*1)
Allows the logging of CSP violations in SilverStripe, (*2)
Installation (with composer)
composer require camspiers/silverstripe-csp-logging
Usage
Provide an instance of Psr\Log\LoggerInterface
to the CSP controller:, (*3)
- Create a file called
mysite/_config/csp.yml
and add your logging service to the controller
Injector:
Camspiers\CSP\Controller:
constructor:
0: %$Monolog
- Set your Content-Security-Policy headers
- Add "report-uri /csp-report/;" to the
Content-Security-Policy
header to log violations through SilverStripe
dev-master
9999999-dev
Logs CSP violations through a logger
Sources
Download
MIT
The Requires
The Development Requires