=== Cokama Security Headers ===
Contributors: littlegreenman
Tags: security, headers, hsts, csp, ssl
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.20
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Checks HTTP security headers and HTTPS, and can send the missing ones. Installing changes nothing.

== Description ==

Cokama Security Headers & SSL checks the HTTP security headers on your home page, login page and admin, explains each in plain English, and can send the missing ones from WordPress.

**Nothing locked, no Pro version.** The full checker is in this plugin.

Installing it changes nothing. Each header is switched on by you. HSTS starts at max-age=300 with no includeSubDomains and no preload. max-age is capped at one year. Preload is never sent. CSP is offered in Report-Only; an enforcing Content-Security-Policy is checked when present but this plugin will not send one. The plugin never writes .htaccess. Deactivating it stops every header it sends. HSTS already stored in a browser stays until it expires; turning the plugin off cannot undo that.

= What it checks =

* Strict-Transport-Security, Content-Security-Policy (enforcing, check only) and Report-Only, X-Content-Type-Options, X-Frame-Options / CSP frame-ancestors, Referrer-Policy, Permissions-Policy, Cross-Origin-Opener-Policy
* X-Powered-By and Server version leaks
* HTTPS on Home and Site URL, HTTP to HTTPS redirects (including the www twin), certificate dates and trust, and mixed content on the home page

If a check cannot run (loopback blocked, OpenSSL missing, timeout, or a certificate WordPress cannot verify), it shows Couldn't test with the reason. That is never shown as a pass. A failed fetch never grades as Good, Missing, or mixed-content 0.

More free plugins and help from iWorks Ireland: https://iworks.ie/wp-tools/

== Installation ==

1. Upload the `cokama-security-headers` folder to `/wp-content/plugins/`, or install the zip from Plugins → Add New.
2. Activate the plugin.
3. Open **Cokama Tools → Security Headers**, run the check, then switch on only the headers you want.

== Frequently Asked Questions ==

= Does installing it change my headers? =

No. Every header starts off.

= Does this plugin contact other sites? =

No. It only requests your own site (home, login and admin) and, for the certificate check, opens a TLS connection to your own host.

= Why is preload not offered? =

HSTS preload is very hard to undo. This plugin never sends preload. max-age is capped at one year (31536000 seconds).

= What happens if I turn HSTS off? =

Browsers keep forcing HTTPS until the max-age they already stored expires. Deactivating this plugin cannot undo that. When you turn HSTS off, you can send max-age=0 for 30 days so browsers forget it.

= Nothing locked, no Pro version? =

Yes. There is no paid upgrade inside this plugin.

== Screenshots ==

1. Header check results with grades for the home, login and admin responses.
2. HTTPS and certificate checks, including the www twin.
3. Set headers, with HSTS options and a live preview. Preload is never sent.
4. The max-age=0 turn-off offer when you switch HSTS off.
5. Report ready to copy for a developer or host.

== Changelog ==

= 1.2.20 =
* Renamed to Cokama Security Headers. Improved file path handling and output escaping.

= 1.2.19 =
* Version aligned with the rest of the Cokama suite. No functional changes.

= 1.0.1 =
* Rebuild HSTS from parsed directives only, drop preload, and cap max-age at one year.
* A failed loopback never grades as Good, Missing, or mixed-content 0.
* Grade self-signed certificates as not trusted by browsers.
* Check an enforcing Content-Security-Policy when the site already sends one.
* Offer max-age=0 for 30 days when turning HSTS off.

= 1.0.0 =
* First public release.

== Upgrade Notice ==

= 1.2.20 =
Renamed to Cokama Security Headers. Improved file path handling and output escaping.

= 1.2.19 =
Version aligned with the rest of the Cokama suite. No functional changes.

= 1.0.1 =
Safer HSTS handling and honest grades when a check cannot run.

= 1.0.0 =
First public release.
