BoundaryGuard Headers
Automatically enforces essential HTTP security headers to protect your site from XSS, clickjacking, and protocol downgrade attacks.
Install in
BoundaryGuard Headers enforces modern HTTP security headers to harden your WordPress site against XSS, clickjacking, mixed content, and cross-origin attacks.
Key Features:
- Essential Protection: Adds X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy to reduce attack surface and prevent clickjacking.
- HSTS (Strict Transport Security): Forces HTTPS connections to help prevent protocol downgrade and man-in-the-middle attacks.
- Advanced Isolation (COOP/COEP): Enables Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy to improve cross-origin isolation and mitigate certain side-channel attacks.
- Content Security Policy (CSP): One of the strongest defenses against XSS. Includes a dashboard-based CSP builder with one-click presets to whitelist trusted sources for scripts, iframes, API endpoints, and images.
- CSP Report-Only Mode & Nonce Mode: Test your policy safely without blocking content, then move to per-request script nonces for the strongest possible policy.
- Security Score: A 0-100 score and A+-to-F grade computed from your settings, with an itemized checklist showing exactly what’s missing.
- Live Header Scan: Checks your site’s actual live HTTP response headers so protection already provided by your host, theme, another plugin, or a CDN is correctly detected and credited.
- CSP Violation Log: A visual dashboard (14-day trend, top blocked sources, breakdown by directive) for anything your policy has blocked, with CSV export.
- Import/Export: Move your configuration between sites as a JSON file — handy for agencies rolling out the same policy across clients.
- In-Plugin Documentation: A full read-only reference covering every setting, without leaving WP Admin.
- Server Header Hardening: Removes or limits exposure of headers such as
X-Powered-ByandServer. - Lightweight and Fast: Uses PHP headers for broad server compatibility and minimal performance impact.
- No
.htaccessEditing Required: Works without modifying server configuration files.
Designed for developers and site owners who want stronger security without unnecessary complexity.
External Services
This plugin provides a Content Security Policy (CSP) builder. To assist users, it includes “Preset Buttons” that allow users to quickly add domain names to their own CSP whitelist.
This plugin DOES NOT connect to, load data from, or send data to these services automatically. The following third-party domains are referenced as presets within the admin dashboard for whitelisting purposes:
* Google Analytics (www.google-analytics.com, stats.g.doubleclick.net) – Used for tracking whitelisting. Privacy
* Google Tag Manager (www.googletagmanager.com) – Used for tag management. Privacy
* Stripe (js.stripe.com, api.stripe.com) – Used for payment processing. Privacy
* Facebook (www.facebook.com, connect.facebook.net) – Used for social embeds. Privacy
* YouTube (www.youtube.com, youtube-nocookie.com, i.ytimg.com) – Used for video embeds. Privacy
* Vimeo (player.vimeo.com) – Used for video embeds. Privacy
* Gravatar (secure.gravatar.com) – Used for user avatars. Privacy
* Google Maps (maps.google.com) – Used for map embeds. Privacy
* Google Fonts (fonts.googleapis.com, fonts.gstatic.com) – Used for web font whitelisting. Privacy
* Zendesk (assets.zendesk.com) – Used for support widget whitelisting. Privacy
Written by Joobi from the project's own listing. See the source page
2.0.1
- Security: the CSP violation report endpoint now limits request size (16 KB), the number of entries per request, the length of each stored field, and the overall write rate, so it can no longer be used to flood or wipe the log or bloat the options table
- Security: CSP violation CSV export now neutralizes spreadsheet formulas (values starting with =, +, -, @) so attacker-supplied report data can’t execute when the file is opened in Excel or Sheets
- Security: CSP source lists are now validated when the header is built — entries containing
;or,can no longer inject extra directives (for example a roguereport-uriorsandbox) through the CSP Builder or an imported settings file - Security: the “delete data” action is now handled only on a genuine deactivate request for this plugin, requires the
activate_pluginscapability and a valid nonce, and can no longer be triggered by a plain request to the Plugins screen - Fixed: “Delete everything” in the deactivation dialog never deleted anything, because WordPress redirects before the code that handled it ran; it now runs on
admin_initand works as intended - Fixed: CSP Nonce Mode blocked every script on the site because WordPress core’s script tags never received the nonce; the nonce is now added through the
wp_script_attributesandwp_inline_script_attributesfilters - Fixed: a fatal error when importing or saving settings with an array in place of a dropdown value
- Fixed: an empty or zero HSTS max-age silently sent
max-age=0and disabled HSTS; it now falls back to one year - Fixed: the CSP
report-todirective referenced an endpoint that was never defined; the plugin now sends a matchingReporting-Endpointsheader - Changed: Permissions-Policy now sends
payment=(self)instead ofpayment=(), so Payment Request based checkout buttons (Apple Pay, Google Pay) keep working on WooCommerce sites - No changes to settings storage or option keys — all existing configurations carry over automatically
2.0.0
- Fixed: the deactivation “keep or delete your data” confirmation wasn’t appearing — WordPress URL-encodes the plugin path in the deactivate link’s href, so the script’s old link-matching logic never found it. It now matches the plugin’s row on the Plugins screen directly, so the confirmation always fires. The confirmation is now also a styled in-page dialog instead of a plain browser confirm() popup
- Fixed: that script also attached to a jQuery-dependent script handle that isn’t always loaded on the Plugins screen; it’s now attached to jQuery directly so it’s reliably present
- Removed a stray, incorrect
register_deactivation_hook()registration left over from development that duplicated (and could interfere with) the real hook the confirmation relies on - Fixed several PHPCS findings: an incorrect direct-filesystem-call warning on a streamed CSV export, unsanitized-input warnings on the settings-import file upload, a missing-nonce warning on a read-only success-notice flag, and unprefixed-global-variable warnings in
uninstall.php‘s multisite cleanup - Reworked the admin UI: replaced the single long settings screen under Settings with a dedicated top-level “BoundaryGuard” menu and six focused pages — Dashboard, Header Policies, CSP Builder, Violation Log, Import/Export, and Documentation
- Added a Security Score card: a 0-100 score and letter grade (A+ to F) computed from your settings, with an itemized checklist and tips for closing each gap
- Added a Live Header Scan: the Security Score now checks your site’s actual live HTTP response headers, not just this plugin’s own settings — so protection already provided by your hosting, a theme, another plugin, or a CDN/edge layer is correctly detected and labeled “External,” with a “Re-scan Now” action and scan-status bar; results are cached for an hour (5 minutes on failure) and fall back to plugin-only detection if the scan can’t reach your site
- Exposed X-Frame-Options, Referrer-Policy, COOP, and COEP as configurable dropdowns (previously read from options but never editable in the UI)
- Added CSP violation reporting (“Log Violations”) and a visual Violation Log dashboard (14-day trend, top blocked sources, breakdown by directive) built on Chart.js, with CSV export alongside the existing JSON settings export
- Added CSP Nonce Mode: replaces ‘unsafe-inline’/’unsafe-eval’ on script-src with a per-request nonce for a stronger policy; exposes
BoundaryGuard_Headers::nonce_attr()for theme/plugin developers - Added one-click “Apply Recommended Defaults” button, Import/Export of settings as JSON, and a confirmation prompt on “Clear Log” to prevent accidental deletion
- Added quick status/toggle pills, empty-state prompts, a tab strip, and quick-nav cards for faster navigation between sections
- Added a new in-plugin Documentation page — a read-only reference covering how header sending works, what each admin page does, the full Security Score breakdown, a CSP quick reference, violation reporting, the developer nonce helper, data storage, and an FAQ — laid out with a sticky on-page navigation sidebar and icon-led section cards
- Refreshed the admin UI with a consistent color palette across every page, cleaner card and button styling, and a fixed CSP Builder hint that previously rendered as unstyled floating text below the “Save CSP Settings” card
- Added
uninstall.phpfor reliable cleanup on delete, including multisite - Fixed: settings sanitization now merges with existing saved options instead of rebuilding from scratch, preventing one settings form from silently blanking out fields owned by another form
- No changes to settings storage or option keys from 1.0.0 — all existing configurations carry over automatically
1.0.0
- Initial release
- Added essential HTTP security headers
- Implemented HSTS support
- Added CSP builder with report-only mode
Follow this listing's changes (Atom feed)