Linux 软件免费装
Banner图

JM Website Security Hardening

开发者 giuse
更新时间 2026年11月7日 00:14
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

privacy security headers clickjacking hardening

下载

1.1.0 1.0.0

详情介绍:

JM Website Security Hardening asks what the site is allowed to do, in plain language, and sends the matching browser rules. You choose: The plugin writes the Content Security Policy and the related security headers from those answers. A log shows addresses that fell outside the rules, so you can start without blocking anything and turn blocking on when the result looks right. The recommended answers suit a normal site. Strict answers refuse code written directly in the page and can break a theme, a plugin, the dashboard, or the login screen. Image hotlinking uses root .htaccess on Apache and LiteSpeed: rewrite lines also go through mod_rewrite_rules, and the full BEGIN JMWSH / END JMWSH block (including Cross-Origin-Resource-Policy in “only this website” mode) is written with insert_with_markers(). On nginx the settings screen shows the matching server-block configuration to paste. Headers Depending on the answers, the plugin can send: Developer hooks

安装:

  1. Upload the plugin folder to /wp-content/plugins/, or install the zip from the Plugins screen.
  2. Activate JM Website Security Hardening.
  3. Open Settings → Website Security.
  4. Review the answers. Leave “Allow it, and keep a note” selected at first.
  5. Turn protection on and save.
  6. Browse the public site, then read the notes at the bottom of the settings screen.
  7. Switch to “Block it” when you are ready.

常见问题:

Do I need to understand Content Security Policy?

No. The screen asks where files may come from and who may use this site. The policy is built from the answers.

Will this break my site?

It can, if you block code that a theme or plugin writes directly into the page. Start with notes instead of blocking. The recommended answers allow that inline code. The strict answers do not.

Can I see what would have been blocked?

Yes. Choose “Allow it, and keep a note”, turn on “Keep a note when a rule matches”, save, and visit the public site. The settings screen lists the page, the kind of file, and the address.

Who can display images from the media library?

Anyone, only this website, or this website plus the domains you list. A visitor who types the image address can still open it. Browsers that hide the previous page are treated as a direct visit. On Apache and LiteSpeed, saving writes every rule into the root .htaccess. On nginx, paste the configuration shown on the settings screen into the server block.

Are the notes sent anywhere?

No. They are written to wp-content/uploads/jm-website-security-hardening/csp.log. Only the latest notes are kept. Clear them from the settings screen, or delete the plugin to remove the file.

Does each site in a network have its own rules?

Yes. Settings are saved per site.

How do I show the .htaccess debug panels?

Add define( 'JMWSH_HTACCESS_DEBUG', true ); to wp-config.php. The root .htaccess status box and the debug write log appear only while that constant is true.

更新日志:

1.1.0 1.0.1 1.0.0