Your SaaS already sends HTTP response headers with every response. Some of those headers are instructions the browser follows when it renders your pages, and a few of them close real attack classes. Security testers look for some of them: MDN's X-Content-Type-Options page notes that site security testers usually expect that header to be set.
One caveat before the list: not every header applies to every response. Several of these matter mostly for HTML documents a browser renders. An API that only returns JSON needs a narrower set. HSTS only has meaning over HTTPS. Check each header against what your app actually serves.
1. Strict-Transport-Security
HSTS tells browsers your host should only be accessed over HTTPS, and that future HTTP attempts should be upgraded automatically. Once a browser has seen it, it will not let the user bypass certificate errors on your domain either.
Two details matter. First, browsers ignore the header when it arrives over plain HTTP, so it only counts on your HTTPS responses. Second, includeSubDomains extends the policy to every subdomain, so only add it when all of them are HTTPS-ready. My advice is to start with a short max-age and raise it once you are confident nothing on the domain still needs HTTP.
2. Content-Security-Policy
CSP controls which resources the browser may load for a page: scripts, styles, images, and more. Its main job is limiting the damage of cross-site scripting, because an injected script from an unapproved origin no longer runs.
This is the hardest header on the list to get right, because a strict policy can break your own frontend. MDN documents Content-Security-Policy-Report-Only for exactly this reason: you report violations without blocking code while you tune the policy. Use that first, then enforce.
3. X-Content-Type-Options: nosniff
This header tells the browser to respect the Content-Type you sent instead of sniffing the content and guessing. With nosniff, the browser blocks responses for scripts and styles when the MIME type does not match, and it will not interpret a text/plain response as HTML.
That second behavior matters if users can upload files or submit content you later serve back. Sniffing can turn something you meant as plain text into an executed HTML page. Setting nosniff is one line; it also forces you to keep your Content-Type headers correct, which you should do anyway.
4. Referrer-Policy
When a user clicks a link on your site, the browser may send a Referer header to the destination. Referrer-Policy controls how much of the original URL goes along: full path and query, origin only, or nothing.
If your URLs ever carry sensitive values, like tokens in a password reset link, the default policy (strict-origin-when-cross-origin) sends the full URL only on same-origin requests and just the origin on secure cross-origin ones, and that may not be what you want on those pages. You can set a stricter policy such as same-origin or no-referrer per response. Match the policy to what your URLs contain.
5. Permissions-Policy
Permissions-Policy lets you allow or deny browser features like the camera, microphone, and geolocation, for your document and for any iframes inside it.
If your product never uses these features, denying them is cheap insurance: injected or third-party content on your pages cannot quietly ask for them. The syntax is direct, for example Permissions-Policy: geolocation=(), camera=(). If only some pages need a feature, send a narrower policy there.
6. X-Frame-Options (and frame-ancestors)
Clickjacking works by embedding your page in an invisible frame on another site and tricking the user into clicking. X-Frame-Options: DENY or SAMEORIGIN stops other sites from framing your pages.
The newer replacement is the frame-ancestors directive inside CSP, which MDN describes as the more comprehensive option and which modern browsers prefer. If you already send a CSP, put frame-ancestors there; X-Frame-Options still works as a fallback for older browsers.
7. Cross-Origin-Resource-Policy
CORP tells the browser to block no-cors cross-origin or cross-site requests for a given resource. The values are same-site, same-origin, and cross-origin.
If you host resources that other sites should not be embedding, such as private images or downloads reachable by URL, CORP is how you say so. It complements CORS rather than replacing it: CORS governs reading cross-origin responses, which I covered in yesterday's piece, while CORP restricts no-cors cross-origin loading of the resource, such as embedding it through an image or script tag.
Where these actually get set
You can send these headers from your application framework's middleware, from a reverse proxy like nginx, or from your CDN at the edge. Pick one place per header. Setting the same header in two layers with different values creates confusing behavior that is hard to debug.
To see what you send today, open your browser's Network panel and inspect the response headers on your own pages, or run a command-line client against them. The OWASP Secure Headers Project maintains reference material on these headers if you want the deeper version.
The main takeaway: security headers are response configuration, not a product feature, and most take minutes to check. Verify which ones fit the responses you actually serve, set them in one layer, and confirm them on a live response.
Cover photo by Philippe Murray-Pietsch, free to use under the Unsplash License.
I write about startups and AI on StartupWiki.


