A package for adding a Content security policy on WordPress with Roots - Bedrock/Acorn

1.0.2 2025-03-20 09:32 UTC

This package is auto-updated.

Last update: 2025-04-20 08:39:01 UTC


README

WP CSP is a Composer package that provides a Content Security Policy (CSP) implementation for WordPress Bedrock/Sage applications.

Installation

You can install the package via Composer:

composer require concept-image/wp-csp

Publish Command

After installing the package, you need to publish the configuration file.

Run the following command:

wp acorn vendor:publish --tag="wp-csp"

Usage

After publishing the configuration file, you can customize it as needed.

The package automatically sets up the Content Security Policy for your WordPress application. Make sure to review and modify the config/csp.php file to define the rules that suit your project.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes you'd like to make.

License

This package is open-source software licensed under the MIT license. Please see the License File for more information.