Security headers for Vercel, Netlify and Replit apps
Set security headers at the layer that serves the final response, then verify the published domain. Vercel configuration, Netlify headers and an application server are different mechanisms; use the one your deployed route actually follows.
Check your app free, first fix freeBegin with the final HTTPS response, not a configuration file that may never be applied. Add a small compatible baseline, design CSP around the resources your app really uses and test sign-in and checkout before enforcement. Inspect redirects and important routes separately because a header on the homepage does not establish coverage everywhere.
Find the serving layer first
A static host may read a deployment configuration file, while an application server can set headers directly. Some routes are handled by framework middleware or functions rather than the static-file path. Identify the mechanism for the response you are testing instead of adding multiple conflicting copies of a policy.
Inspect your custom domain after redirects. A header on a preview URL does not prove that the production domain serves the same configuration. Check the rendered page, relevant APIs and any embedded report separately when their intended browser behavior differs.
Start with a compatible baseline
The following illustrates Netlify's static headers-file syntax. It is not a Vercel configuration file or a universal Replit setting.
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()Do not disable camera, microphone or geolocation if your application intentionally needs them without first designing the appropriate permissions. On Vercel, use its documented headers configuration or framework support. For an application server, add the corresponding response headers in the actual request path. Verify rather than assuming a file name works on every host.
Design CSP around real dependencies
Content Security Policy can restrict script, frame, connection and other resource origins. A copied strict policy can also break sign-in, payment buttons, analytics or embedded tools. Inventory real origins, test a report-only policy where supported and enforce only after reviewing the relevant user journeys.
Avoid fixing every violation by adding a wildcard or broad unsafe directives. Each allowance should have a reason. Conversely, do not claim a security improvement while silently disabling a legitimate customer feature. The evidence must include both the resulting policy and the tested behavior.
ProofForge's public check can inspect the header it receives. It cannot supply evidence that a native wallet button works on every device or that your full payment lifecycle is correct. Those require controlled application and provider tests.
Use HSTS only for the right scope
HSTS tells browsers to use HTTPS for future requests after receiving the policy. Consider subdomains and operational recovery before adding includeSubDomains or pursuing preload. A subdomain that still requires HTTP can be affected by a broad policy.
An HTTPS redirect and HSTS are different observations. Verify both as appropriate, and do not treat a policy copied into source as proof that the final public response includes it.
Verify the real response after deploying
Use a local header request or browser network panel. Redirect-following matters because the first response can differ from the final page.
curl --head --location --max-time 15 https://your-app.exampleInspect the status, final host and duplicate policy headers. Repeat on the important routes instead of generalizing from a single success.
Turn the check into a release decision
Keep a small record of the production URL, the time you checked it, the exact finding and the action you took. A local preview and a deployed application can have different environment variables, response headers and database projects. After a repair, deploy the intended version and check the public address again. Do not assume that changing a repository file changed the live system.
Read coverage as carefully as the score. A timed-out asset, an ambiguous backend configuration or a request that could not safely establish access should remain unknown. It should not disappear from your release notes merely because there is no red finding. If a check was not completed, decide who will review it and what additional evidence is needed.
ProofForge's free report includes the first fix. The $9 Fix Report unlocks all findings' available repair guidance and builder prompts, with a PDF and private report link. Fix + Guard costs $29 once and adds builder rules, on-demand deploy-hook scans for 30 days and four weekly rechecks you start yourself. These are different deliverables, not different promises that an application is completely secure.
Keep private report URLs out of public issues and commits. If you need shareable evidence, use the owner-verification and publication flow for an eligible receipt. A signature protects the recorded assessment against undetected changes; it does not make the assessment exhaustive, prove a business outcome, or show that a later deployment still matches an earlier result.
Questions builders ask
Can I use the same config file on every host?
Should I paste the strictest CSP I can find?
Does a passing header check prove checkout works?
Related checks and fixes
Continue with a related guide
Sources
Scan your app free
See what your live app ships to every visitor, with the first fix free. A clean scan is not a full audit. Run it only on an app you own or have permission to test.
Scan your app free