← Blog · 22 October 2026
Is your Lovable or Bolt app missing security headers? How to check and fix it
Check it in one minute: paste your app's address into the free Vibe-App Watchdog scan. We look at your app from the outside, like any visitor, and list which of the five common security headers are missing, in plain words.
What are security headers?
When a browser loads your app, your host sends a few lines of extra information along with the page. These are called response headers. Some of them are safety rules for the browser, like "don't let other sites put this page in a frame" or "only load scripts from these places".
They are not part of your React code. They come from whatever serves your files: Lovable's hosting, Bolt's hosting, Netlify, Vercel or Cloudflare.¹ That is why asking the AI to "make the app secure" often does not add them.
The five headers worth checking
OWASP, a well-known web security group, keeps a list of recommended headers.² These five are the ones our scan checks:
- Content-Security-Policy (CSP): tells the browser which scripts, styles and connections are allowed. It makes many script-injection attacks much harder.³
- X-Frame-Options: stops other sites from loading your app inside a hidden frame (called clickjacking). The newer way is the CSP rule
frame-ancestors.⁴ ⁵ - Strict-Transport-Security (HSTS): tells the browser to always use HTTPS for your site.⁶
- X-Content-Type-Options: nosniff: stops the browser from guessing file types, which can turn an uploaded file into a script.⁷
- Referrer-Policy: controls how much of your page address is shared with other sites when a user clicks a link.⁸
How to check your app by hand
- Open your live app in Chrome or Firefox.
- Press F12, open the Network tab and reload the page.
- Click the first row (your page itself) and look at Response Headers.
- Look for the five names above. Anything not in the list is missing.
If you are comfortable with a terminal, curl -I https://your-app.com shows the same list.
Check the address your users actually visit. If you use a custom domain, check that, not only the lovable.app or bolt.host address.
How to add the missing headers
Where the fix goes depends on where your app is hosted.
Netlify (including Bolt apps published to Netlify). Add a plain text file called _headers to the folder that gets published (for a Vite app, usually public/). Netlify reads it and adds the headers to every page.⁹
Example _headers file (the first line means "every page"; the header lines below it start with two spaces):
/*X-Frame-Options: DENYX-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-originStrict-Transport-Security: max-age=31536000; includeSubDomains
Careful with HSTS: only keep includeSubDomains if every subdomain of your site works on HTTPS. If one does not, browsers will refuse to load it. If you are not sure, leave that part out.
Vercel. Add a headers section to vercel.json in the root of your project.¹⁰
Lovable's own hosting. Lovable's publishing docs cover the address, HTTPS and who can see your app, but do not describe a setting for your own response headers.¹¹ You have three options:
- Ask Lovable to add a CSP as a
<meta http-equiv="Content-Security-Policy">tag inindex.html. This helps with scripts, but browsers ignoreframe-ancestorsin a meta tag, so it does not stop framing.⁴ - If your custom domain runs through Cloudflare, add the headers with a Response Header Transform Rule.¹²
- Sync the project to GitHub and host the build on Netlify or Vercel, then use the steps above.
Bolt's own hosting (bolt.host). Bolt's hosting docs do not describe a header setting either.¹³ Publishing a project to Netlify from Bolt (Netlify notes you choose this before the first publish)¹⁵, or putting Cloudflare in front of your custom domain, gives you the same options as above.
Start CSP in "report only" mode
A strict CSP can break your app if it blocks something you need, like your Supabase project, fonts or a payment script. Start with the Content-Security-Policy-Report-Only header. The browser then only reports what it would have blocked, without blocking it.¹⁴ When the reports are clean, switch to the real header.
A prompt you can give your AI tool:
"Add security headers for my host: X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy strict-origin-when-cross-origin, HSTS, and a Content-Security-Policy in report-only mode that allows my Supabase project and the other domains this app really uses. Tell me which file you changed."
Then check the headers again in the Network tab after you publish.
What headers do not fix
Headers make the browser safer. They do not protect your data. If your Supabase tables have Row Level Security off, or a secret key sits in your JavaScript, headers will not help. See How to check Supabase Row Level Security and Is a secret API key hiding in your app's frontend?.
What our scan can and cannot see
The free scan is passive. It checks the five headers above, common files that should not be public (like /.env or /.git/config), and patterns that look like secret keys in your public JavaScript. It cannot see your database rules or your server code. A good score means we did not find the common problems we check for. It does not mean your app is fully safe.
👉 Run the free scan on vibeappwatchdog.com
--- Sources
- 1. Netlify – Custom headers ("custom adjustments or additions to the default HTTP headers that Netlify serves"): https://docs.netlify.com/manage/routing/headers/
- 2. OWASP – HTTP Security Response Headers Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html
- 3. MDN – Content-Security-Policy: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy
- 4. MDN – CSP frame-ancestors (not supported in the meta element): https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-ancestors
- 5. MDN – X-Frame-Options: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options
- 6. MDN – Strict-Transport-Security: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security
- 7. MDN – X-Content-Type-Options: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options
- 8. MDN – Referrer-Policy: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy
- 9. Netlify –
_headersfile syntax: https://docs.netlify.com/manage/routing/headers/ - 10. Vercel – vercel.json headers: https://vercel.com/docs/project-configuration/vercel-json#headers
- 11. Lovable – Publish your Lovable project: https://docs.lovable.dev/features/publish
- 12. Cloudflare – Response Header Transform Rules: https://developers.cloudflare.com/rules/transform/response-header-modification/
- 13. Bolt – Hosting: https://support.bolt.new/cloud/hosting
- 14. MDN – Content-Security-Policy-Report-Only: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy-Report-Only
- 15. Netlify – Deploy your Bolt app to Netlify: https://www.netlify.com/knowledge-base/deploy-your-bolt-app-to-netlify/