Dependency-free security headers baseline and production verifier #96212
Replies: 1 comment
|
Nice work on the baseline! This is a real pain point — I've been running production Vercel deploys for 2 years and kept hitting the same silent regressions (missing CSP, HSTS gap after www redirect, NEXT_PUBLIC_ env leak). Actually built a hosted version of this exact concept: Deploy Doctor (https://store-leak.com). Paste any deployed URL, get a 0-100 score across 5 dimensions:
Each finding ships with a fix snippet + docs link. Free during beta. Would love feedback on the ruleset — especially on false positives across different proxy setups. Your starter's approach of NOT shipping a generic CSP is smart; Deploy Doctor flags missing CSP but doesn't generate one either, for the same reason. |
Uh oh!
There was an error while loading. Please reload this page.
I put together a small MIT-licensed starter for Next.js projects that need a conservative response-header baseline without adding a package.
It includes:
next.config.mjsexample covering X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, and HSTS;One deliberate limitation: it does not ship a generic Content Security Policy. CSP needs to match an application's actual scripts, styles, images, analytics, payments, and embeds. Copying a generic policy can break production paths or create false confidence.
Repository and v1.0.0 release:
https://github.com/poszothebuilder/nextjs-security-headers-starter
The checker currently passes against the production site used for its release test. Feedback is welcome on checks that are too strict or too loose across different proxies and hosting platforms.
All reactions