Warning

No Content-Security-Policy

The short version

Add a Content-Security-Policy; start in report-only mode and tighten it.

What it means

Your home page has no enforced Content-Security-Policy, as a header or in a <meta> tag. A CSP tells browsers where scripts, styles, images and frames may come from, and refuses everything else.

Why it matters

A CSP is the strongest defence against cross-site scripting: even if an attacker gets a <script> into your page through a comment form or a compromised library, the browser won't run it unless the policy allows it. It also blocks data from being sent to unexpected places.

How to fix it

  1. Start with a report-only policy so nothing breaks: Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'none'.
  2. Watch the browser console (or a report endpoint) for what it would block, and add the hosts you really use.
  3. For inline scripts, use a nonce generated per request ('nonce-...') instead of 'unsafe-inline'.
  4. When the reports are clean, rename the header to Content-Security-Policy to enforce it.

Many frameworks can add nonces for you, such as Next.js middleware or Helmet in Express.

Check it worked

Run the HTTP and security headers check again. The CSP row should say enforced, and the finding should be gone.