Linux 软件免费装
Banner图

BoundaryGuard Headers

开发者 jsjack74
更新时间 2026年8月17日 14:45
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

security xss csp hsts http-headers

下载

1.0.0 2.0.0

详情介绍:

BoundaryGuard Headers enforces modern HTTP security headers to harden your WordPress site against XSS, clickjacking, mixed content, and cross-origin attacks. Key Features: Designed for developers and site owners who want stronger security without unnecessary complexity.

安装:

  1. Upload the boundaryguard-headers folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Configure the settings from the BoundaryGuard menu in the WordPress admin sidebar.

屏幕截图:

  • CSP Builder — one-click presets and per-directive whitelisting, with Report-Only and Nonce Mode.
  • Violation Log — 14-day trend, top blocked sources, and breakdown by directive.
  • In-plugin Documentation page with sticky on-page navigation.

升级注意事项:

2.0.0 Major update: full admin UI rework across six pages, a Security Score, Live Header Scan, Violation Log, Import/Export, and a new in-plugin Documentation page. No changes to settings storage — your existing configuration carries over automatically.

常见问题:

Does this plugin edit .htaccess?

No. BoundaryGuard Headers uses PHP headers, which improves compatibility across different hosting environments.

Can I test Content Security Policy without breaking my site?

Yes. The plugin includes a CSP Report-Only Mode that allows you to monitor policy violations without blocking any resources.

Will this affect site performance?

No. The plugin is lightweight and adds negligible overhead, as headers are sent as part of the normal HTTP response.

What is the Security Score, and how is it calculated?

It's a 0-100 score (A+ to F) shown on the Dashboard, based on nine weighted checks across all four header groups. Full breakdown of point values is on the in-plugin Documentation page.

What does the Live Header Scan do?

It checks your site's actual live response headers, not just this plugin's own settings — so if a header is already being sent by your host, theme, another plugin, or a CDN, you get credit for it and it's labeled "External" so you always know where the protection is really coming from.

Will this work with a caching plugin or a CDN?

It depends on how caching is set up. Headers are sent through PHP on each request, so they apply whenever WordPress actually handles that request. If a full-page cache serves a stored HTML file directly (bypassing PHP entirely) or a CDN edge serves from its own cache, this plugin's headers won't be part of that cached response. Run the Live Header Scan after setting up caching to confirm the headers are still showing up on the live site — if they're missing, you may need your caching layer to pass through origin response headers, or add matching headers at the server/CDN level as a supplement.

What is CSP Nonce Mode, and should I turn it on?

Nonce Mode replaces the looser 'unsafe-inline'/'unsafe-eval' allowance on script-src with a unique per-request nonce, which is a meaningfully stronger policy. It only helps your inline <script> tags if they carry that nonce, though — use the BoundaryGuard_Headers::nonce_attr() helper (see the in-plugin Documentation page) to add it to any inline scripts your theme or plugins output. Turn it on after adapting your inline scripts; otherwise, unnonced inline scripts will be blocked once CSP is enforced.

My site broke (styles, scripts, or embeds stopped working) after enabling CSP. What do I do?

Switch to CSP Report-Only Mode — it logs what the policy would have blocked without actually blocking anything. Check the Violation Log to see exactly which sources are being flagged, add the legitimate ones to the CSP Builder (presets cover common services like Google Analytics, Stripe, YouTube, etc., or add custom domains), then switch back to enforcing mode once the log is clean.

What does the Violation Log show, and where does the data come from?

When "Log Violations" is enabled, visitors' browsers report anything your Content Security Policy blocks (or would block, in Report-Only Mode) to a REST endpoint this plugin registers, and that report is stored in your own database — no third-party service is involved. The Violation Log page shows a 14-day trend, your top blocked sources, and a breakdown by directive, with CSV export and a one-click "Clear Log" (with a confirmation prompt) if you want to start fresh.

Is it safe to turn on HSTS?

Only enable HSTS once your site is reliably served over HTTPS with a valid SSL certificate. HSTS tells browsers to refuse plain-HTTP connections to your domain for the duration you set (one year by default) — if your certificate lapses or you need to fall back to HTTP, visitors won't be able to reach the site until the max-age expires or they manually clear HSTS in their browser.

Can I copy my settings to another site?

Yes. Use "Export Settings (.json)" on the Import/Export page, then upload that file on the destination site's Import/Export page. Useful for agencies applying the same policy across multiple client sites.

Does uninstalling remove my settings?

Deactivating asks whether to keep or delete your settings and violation log. Deleting the plugin afterward always removes both via uninstall.php, including on multisite.

更新日志:

2.0.0 1.0.0