yard / brave-csp
Content Security Policy for Brave sites
v1.4.2
2026-03-27 09:05 UTC
Requires
- php: >=8.2
- spatie/laravel-csp: ^2.0
Requires (Dev)
- yard/php-cs-fixer-rules: ^1.0
- dev-main
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-feat/readspeaker-wildcard
- dev-feat/readspeaker-connect-again
- dev-feat/timeblockr
- dev-test/signed-commit
- dev-feat/with-signed-commit
This package is auto-updated.
Last update: 2026-03-27 09:06:16 UTC
README
Installation
composer require yard/brave-csp
Features
This repository contains a basic Content Security Policy (CSP):
Yard\Csp\Policies\Basic::class
This Policy extends:
Spatie\Csp\Policies\Policy::class
Usage
This policy can be registered in the csp config file provided by the spatie/laravel-csp package:
<?php declare(strict_types=1); return [ /* * A policy will determine which CSP headers will be set. A valid CSP policy is * any class that extends `Spatie\Csp\Policies\Policy` */ 'policy' => Yard\Csp\Policies\Basic::class, ... ];
It can also be extended to create a custom policy:
<?php declare(strict_types=1); namespace App\Csp; use Yard\Csp\Policies\Basic; class Policy extends Basic { public function configure() { parent::configure(); // Add site specific csp directives below } }
In this case the policy config should point to this custom policy:
<?php declare(strict_types=1); return [ /* * A policy will determine which CSP headers will be set. A valid CSP policy is * any class that extends `Spatie\Csp\Policies\Policy` */ 'policy' => App\Csp\Policy::class, ... ];