Fix guides
Step-by-step fixes for findings that come up again and again in sites and apps built with AI tools. Each starts with a read-only check, and each fix was tested as the page describes.
- How to fix "RLS disabled in public" in Supabase
Supabase's advisor says RLS is disabled in public? Find every affected table with a read-only query, enable RLS, add owner-only policies and revoke anon grants. - How to fix a security definer view in Supabase
Supabase flags a security definer view because it bypasses RLS. Find affected views with a read-only query, then switch them to security_invoker. Tested SQL. - How to fix "HSTS missing from HTTPS server"
Scanner says HSTS is missing? Check the header with one read-only request, add Strict-Transport-Security safely in stages, and verify. Tested on this site. - How to fix "Content Security Policy missing"
Scanner says your Content-Security-Policy header is missing? Check it read-only, roll out a policy with Report-Only first, and verify. Tested on this site.
Not sure which fix to do first? Our notes on 5 common gaps in freshly launched AI-built sites show which problems came up most in real checks.
Which security headers should a new website have?
At minimum: Strict-Transport-Security (HSTS), a Content-Security-Policy, X-Content-Type-Options set to nosniff, protection against framing (the CSP frame-ancestors directive, plus X-Frame-Options for older browsers), a Referrer-Policy such as strict-origin-when-cross-origin, and a Permissions-Policy that switches off browser features you don't use, such as the camera and microphone. The OWASP HTTP Headers Cheat Sheet recommends these, and advises against relying on the old X-XSS-Protection header (leave it out or set it to 0). Google's web.dev security headers guide also lists Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy as recommended for all websites.
Strict-Transport-Security: max-age=31536000; includeSubDomains: see how to add HSTS safelyContent-Security-Policy, includingframe-ancestors: see how to add a CSP without breaking your siteX-Content-Type-Options: nosniffX-Frame-Options: DENY(orSAMEORIGIN) for older browsersReferrer-Policy: strict-origin-when-cross-originPermissions-Policy: camera=(), microphone=(), geolocation=(), adjusted to what your site really usesCross-Origin-Opener-Policy: same-origin(orsame-origin-allow-popupsif your sign-in or payment flow opens a pop-up window)Cross-Origin-Resource-Policy: same-origin(orsame-siteif your subdomains load each other's files; files that other sites are meant to load, like a public CDN, usecross-origin)
Also remove response headers that only reveal your stack, such as X-Powered-By; the OWASP Secure Headers Project keeps a list of headers to remove.
Check what you send today with curl -sI https://yoursite.com/ or Mozilla's free HTTP Observatory. Sources, checked 21 November 2026: OWASP HTTP Headers Cheat Sheet, web.dev security headers quick reference and OWASP Secure Headers Project. Want them checked on your live site? The $49 AI Site Audit covers headers along with exposed keys and database rules. Our sample report shows the headers results from a real check of our own site.