Linux 软件免费装

Gmcfuerte Security Headers

开发者 gmcfuerte
更新时间 2026年10月15日 17:25
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

hsts security headers x-frame-options referrer-policy permissions-policy

下载

详情介绍:

Gmcfuerte Security Headers adds the security headers that scanners and hosting audits expect, without editing the web server configuration, and tells you in plain words what each header does. What it sends (each one can be switched off): Values come from short lists of safe choices, so a typing mistake cannot break your site. Never twice: a header that WordPress, another plugin or your .htaccess file already sets keeps its value. The plugin only adds what is missing, and the settings page names the headers it leaves to your .htaccess file. Self-check: one click reads the headers your home page really sends (including those set by the server, the .htaccess file or other plugins) and shows, for each one, its status (OK, missing, sent twice, weak, reveals information), the value received and what it means. The plugin stores one option with your choices. It sets no cookies and does not collect personal data. A Pro edition adds a Content-Security-Policy with a Report-Only rollout and script nonces, free-form policy values, HSTS preload with reverse-proxy checks and 404 responses for version-revealing files. This free plugin works on its own and does not need it. If both are active, this plugin sends nothing and says so on its settings page. The Pro sends headers only with a valid licence, so run the self-check to see what your site really sends. Settings do not carry over.

安装:

  1. Upload the gmcfuerte-security-headers folder to /wp-content/plugins/, or install the ZIP from Plugins -> Add New -> Upload Plugin.
  2. Activate the plugin through the Plugins screen.
  3. Open Settings -> Gmcfuerte Security Headers, check the choices and click Save Changes.
  4. Click "Run the self-check" to see what your home page sends.

升级注意事项:

1.0.1 Uses automatic translation loading and WordPress.org language packs. Security headers and saved settings are unchanged. 1.0.0 First release.

常见问题:

Will it break my site?

The defaults suit most sites, with two points to check:

  • The Basic Permissions-Policy, on by default, turns off camera, microphone and location for your pages and for everything embedded in them. Maps that locate the visitor (including the "my location" button of an embedded map), video calls, voice input and QR scanners stop working. If your site uses any of them, set Permissions-Policy to Off.
  • X-Frame-Options stops other sites from showing your pages in a frame: switch it off if another site of yours embeds these pages.
The Strict Permissions-Policy preset also blocks browser payment buttons (Apple Pay, Google Pay): do not use Strict on shops that use them.

Why does the self-check still show a header as missing?

Headers are added by PHP. A page cache that serves stored pages without running PHP, or a CDN, may drop them. Some headers may also be left to your .htaccess file (the settings page lists them): if your server ignores the .htaccess file or lacks mod_headers, they are not sent. While the Pro edition is active this plugin sends nothing, and the Pro sends headers only with a valid licence.

Why is a header "sent twice"?

Two layers set it, for example the server configuration and a plugin. This plugin never adds a header that is already present in PHP or declared in your .htaccess file, but it cannot see headers that the server or a proxy adds on its own. Keep one source.

Should I turn on HSTS?

Only when every page and file of your site works over HTTPS. Browsers that receive HSTS refuse plain HTTP for your domain for the whole max-age, and turning the setting off does not undo that. Start with 5 minutes, then raise it.

Does it add a Content-Security-Policy?

No. A Content-Security-Policy has to be tuned to the scripts and services each site uses. The self-check tells you whether your site sends one.

更新日志:

1.0.1 1.0.0