| 开发者 | giuse |
|---|---|
| 更新时间 | 2026年11月7日 00:14 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
.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:
jmwsh_settings filters the normalized settings before headers are built.jmwsh_headers filters the final header names and values.jmwsh_download_hosts filters the host names allowed to display hosted files.jmwsh_mod_rewrite_rules filters the hotlink rewrite lines added through mod_rewrite_rules.jmwsh_htaccess_rules filters the Apache lines written with insert_with_markers() into the root .htaccess block for static files./wp-content/plugins/, or install the zip from the Plugins screen.No. The screen asks where files may come from and who may use this site. The policy is built from the answers.
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.
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.
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.
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.
Yes. Settings are saved per site.
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.
.htaccess status and debug panels only when JMWSH_HTACCESS_DEBUG is true in wp-config.php.