EngineeringOctober 2, 2026·6 min read

Security Headers Explained: What a Passive Health Check Looks At

A passive health check makes ordinary requests to a public URL, the same kind any browser makes, and reads what comes back: the response headers, the cookies and the TLS connection. It sends no attack payloads. That makes it safe to run against any site and quick to finish. It also means it only sees configuration and not flaws in your application logic. This post goes through what such a check looks at, what each item prevents, a sensible starting value, and the mistakes that come up most.

Transport: TLS and HSTS

TLS protects traffic between the browser and your server. A check looks at whether the site is served over HTTPS at all, whether plain HTTP redirects to HTTPS, which protocol versions are offered, and whether the certificate is valid, complete and not close to expiry. Offer TLS 1.2 and 1.3 and switch off 1.0 and 1.1. Automate certificate renewal and monitor expiry anyway, because automation fails quietly.

Strict-Transport-Security (HSTS) tells the browser to use HTTPS for your domain for a set period, even if a link or the user says http. It closes the gap in which an attacker on the network intercepts the first plain request. A common target value is max-age=31536000; includeSubDomains. Start with a short max-age, such as five minutes, confirm nothing breaks, then raise it.

Common mistakes: sending HSTS only over plain HTTP, where browsers ignore it; adding includeSubDomains while an internal subdomain still runs without HTTPS; and adding preload before you are sure, because removal from browser preload lists is slow.

Content: CSP, framing and MIME sniffing

Content-Security-Policy (CSP) tells the browser which sources of script, style, images and other content a page may load. Its main job is limiting the damage of cross-site scripting: if an attacker injects a script tag, a good policy stops it from running. A reasonable starting point is default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none', with nonces or hashes for the inline scripts you need.

Deploy it first as Content-Security-Policy-Report-Only, so that you see what it would block without breaking the site. The usual mistake is a policy containing 'unsafe-inline' or a wildcard in script-src. It passes a "has CSP" check and does almost nothing against injected script.

Clickjacking is when your page is loaded in an invisible frame on another site and the user is tricked into clicking it. X-Frame-Options: DENY, or SAMEORIGIN, prevents it. The CSP frame-ancestors directive does the same job with more control and takes precedence in modern browsers. Setting both is fine. The old ALLOW-FROM value is obsolete, so use frame-ancestors if specific sites need to embed you.

X-Content-Type-Options: nosniff stops the browser from guessing a content type that differs from the one you declared. Without it, a file uploaded as an image but containing script can end up being run as script. There is one value and no reason to leave it off. Make sure your Content-Type headers are correct first, because nosniff will expose the ones that are wrong.

Privacy and browser features

Referrer-Policy controls how much of the current URL is sent to the next site when a user follows a link or the page loads a third-party resource. URLs often carry things you would prefer not to share, such as internal paths, search terms or tokens. The value strict-origin-when-cross-origin sends only the origin to other sites and nothing when moving from HTTPS to HTTP. It is the default in current browsers, but setting it yourself removes the dependence on defaults. Use no-referrer for pages that hold sensitive data in the URL, and then move that data out of the URL.

Permissions-Policy lets you switch off browser features your site does not use, for your own pages and for anything embedded in them. A site with no need for them can send camera=(), microphone=(), geolocation=(). The benefit is modest: it limits what an injected or third-party script can ask for. The mistake is copying a long policy from another site without checking which features your own pages rely on.

Cookies

Session cookies are what an attacker wants, so their flags matter more than most headers. Secure means the cookie is only sent over HTTPS. HttpOnly keeps it out of reach of JavaScript, so a cross-site scripting bug cannot simply read it. SameSite controls whether it is sent on requests that start from another site: Lax is a sound default and Strict is tighter, and both reduce cross-site request forgery. The __Host- name prefix goes further by making browsers require Secure, a path of / and no Domain attribute.

Common mistakes: setting the flags on the session cookie and forgetting a second cookie that also grants access, such as a remember-me token; setting SameSite=None to make an embedded widget work and leaving it for everything; and scoping a cookie to the parent domain so that every subdomain receives it.

A passive check only sees cookies set on the pages it requests without logging in. If your session cookie is set after login, check it yourself in the browser's developer tools.

CORS

Cross-origin resource sharing (CORS) relaxes the browser rule that stops one site reading responses from another. A check sends a request with an unfamiliar Origin header and looks at what comes back. Because that header is crafted, some tools class this check as active and only run it with permission. The dangerous result is a server that reflects any origin in Access-Control-Allow-Origin and also sends Access-Control-Allow-Credentials: true. That lets any website read your API responses using the visitor's logged-in session.

Keep an explicit list of allowed origins and compare against it exactly. Send Vary: Origin when the header depends on the request. A wildcard is acceptable for public, unauthenticated data. Watch for matching by substring or suffix, which lets a domain like yourcompany.com.attacker.example through.

How to use the results

Fix transport first, then cookies and CORS, then CSP, which takes longest. Set headers in one place, usually the reverse proxy or the framework's middleware, so that error pages, redirects and API responses get them too. Checking only the home page is the most common reason a site looks fine in a scan and is not. Skip X-XSS-Protection: the browser filter it controlled has been retired.

Headers are cheap to get right and worth doing, but a clean result says nothing about injection, broken access control or vulnerable dependencies. Those need active testing and code analysis.

How Spoorder fits

The free Pulse (Health check) costs no credits and runs on a registered target without ownership verification. The Free plan allows three health scans a day. In its basic mode the check reads HTTPS and the HTTP to HTTPS redirect, HSTS, CSP, clickjacking protection, X-Content-Type-Options, Referrer-Policy, Permissions-Policy and server version disclosure. The cookie flag and CORS checks are part of the full mode, which also sends active probes and therefore needs a verified target.

Ready to scan your application?

Free health check: HTTPS, TLS and security headers for one URL, in about a minute. Free account, no credit card.

Scan your app free →
← Back to blog