Rules

Referrer-Policy header missing

SR-WEB-005 · Low

When a user clicks a link or your page loads a resource from another site, the browser may send the current address in the Referer header. Addresses often carry things that should stay private, such as reset tokens, search terms or IDs in the path or query string. Modern browsers default to strict-origin-when-cross-origin, but setting it yourself makes the behavior explicit and lets you choose a stricter value. The fix is to send Referrer-Policy: strict-origin-when-cross-origin, or no-referrer on pages that handle sensitive tokens.

The fix

Before · Terminal
$ curl -sI https://yourapp.com | grep -i referrer-policy
$
After · next.config.js
module.exports = {
  async headers() {
    return [
      {
        source: "/(.*)",
        headers: [{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" }],
      },
    ];
  },
};

How ShipReady finds it

shipready url requests your page once and reports when the response has no Referrer-Policy header. Findings carry rule ID SR-WEB-005.

Run the check

Terminal
npx @shipmate-agency/shipready url https://yourapp.com

The GitHub Action deeflect/shipready@v0.2.0 scans the repo only, so run this check against your deployed site.

Want a person to check every area and send the fixes as pull requests? Launch Lockdown, $950 once.