WP Manifestindependent plugin directory
manifest / security / easy-csp-headers

Easy CSP Headers

Add CSP headers to any WordPress site

by Paul Faulkner · github.com/headwalluk/easy-csp-headers · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/headwalluk/easy-csp-headers/archive/refs/heads/main.zip

A WordPress plugin that automatically generates and injects Content Security Policy (CSP) headers with nonces for enhanced security.

Features

  • Automatic Nonce Generation - Unique nonce for every page load
  • HTML Processing - Uses WordPress WP_HTML_Tag_Processor for safe, fast HTML manipulation
  • Strict-Dynamic Support - Modern CSP with automatic script trust propagation
  • Report-Only Mode - Test CSP without breaking your site
  • Flexible Configuration - Granular control via settings page
  • Cache-Friendly - Works seamlessly with page caching plugins
  • WordPress Standards - Follows WordPress Coding Standards

How It Works

  1. Captures Output - Hooks into template_redirect and starts output buffering
  2. Generates Nonce - Creates a cryptographically secure nonce
  3. Processes HTML - Adds nonce attributes to `