LeakRay
Headers · CORS · Cookies · Passive Audit

HTTP Security Headers & CORS Checker

Test HSTS, Content-Security-Policy, Referrer-Policy, Permissions-Policy, Cross-Origin-Opener-Policy, Subresource Integrity, CORS, and cookie flags in one fast passive scan — alongside bundle secret checks.

01 · Exact Passive Checks

What LeakRay inspects on your live URL

Read /bot passive safety guarantees →
Rule ID & CheckWhat It InspectsWhy It's Passive & Safe
https-and-hsts
HTTPS Enforcement & Strict-Transport-Security
Verifies HTTPS delivery and checks Strict-Transport-Security max-age, includeSubDomains, and preload readiness.Reads HTTP redirect and TLS response headers passively.
security-headers-core
CSP, X-Content-Type-Options, Frame & Referrer Policies
Audits Content-Security-Policy (including unsafe-inline/unsafe-eval risks), X-Content-Type-Options, frame-ancestors/X-Frame-Options, Referrer-Policy, and Permissions-Policy.Inspects response headers from a single standard GET request.
cors-misconfiguration
CORS Origin Reflection & Credentials Check
Detects dangerous combinations like reflected arbitrary Origins paired with Access-Control-Allow-Credentials: true.Passive header check using a benign synthetic Origin header; never sends credentials or cookies.
cookie-security-flags
Set-Cookie HttpOnly, Secure & SameSite Flags
Checks session and auth cookies returned in Set-Cookie headers for missing Secure, HttpOnly, or SameSite attributes.Inspects only unauthenticated response headers without logging in or replaying cookies.

02 · Vulnerable vs. Fixed

Common production leak pattern and the exact fix

Vulnerable
ts
// Vulnerable: Missing security headers and overly permissive CORS
// next.config.ts
const nextConfig = {};
export default nextConfig;

// API route:
res.setHeader("Access-Control-Allow-Origin", req.headers.origin);
res.setHeader("Access-Control-Allow-Credentials", "true");
Fixed
ts
// Fixed: Baseline security headers + explicit CORS allowlist
const securityHeaders = [
  { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload" },
  { key: "X-Content-Type-Options", value: "nosniff" },
  { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
  { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
  { key: "Cross-Origin-Opener-Policy", value: "same-origin" },
];

// Only reflect Origin when it matches an explicit allowlist:
const ALLOWED_ORIGINS = new Set(["https://app.example.com"]);

03 · AI Fix Prompt

Paste into Cursor, Claude Code, Lovable, or Bolt

Harden HTTP security headers, CORS, and cookies for my production web app:
1. Configure `Strict-Transport-Security`, `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`, `Permissions-Policy`, `Cross-Origin-Opener-Policy`, and a tight `Content-Security-Policy` with `frame-ancestors 'none'`.
2. Replace any wildcard or reflected `Access-Control-Allow-Origin` + `Access-Control-Allow-Credentials: true` headers with an explicit origin allowlist.
3. Ensure all session/auth cookies set `HttpOnly`, `Secure`, and `SameSite=Lax` (or `Strict`).
4. Add `integrity` and `crossorigin="anonymous"` attributes to any third-party CDN scripts or stylesheets.

04 · Developer FAQ

Frequently asked questions

How is LeakRay different from Mozilla / MDN Observatory or SecurityHeaders.com?
Header-only scanners can give a site an A+ even when it leaks a Stripe secret key, Supabase service_role JWT, /.env file, or public source map. LeakRay checks HTTP headers, CORS, SRI, and cookies alongside client JS bundles and exposed files in one report.
Does LeakRay support Cloudflare Workers, Vercel, and Netlify header configs?
Yes. LeakRay detects your hosting and framework signals and provides practical fix snippets for next.config.ts, vercel.json, Cloudflare _headers/Workers, and Nginx, plus a copyable AI prompt.
Why does LeakRay check Subresource Integrity (SRI) and Cross-Origin-Opener-Policy?
SRI protects your users if a third-party CDN script is tampered with, and Cross-Origin-Opener-Policy (COOP) isolates your browsing context from cross-origin window leaks.
Is there an account or rate-limit paywall to test my headers?
No signup is required. You can scan your live URL for free, see all 16 pass/fail checks, and re-scan after deploying your header fixes.

More Passive Scanners

Supabase · PostgREST · Passive Audit

Supabase RLS & Key Exposure Checker

Passively scan your live app for leaked Supabase service_role keys, exposed PostgREST schemas, and missing RLS signals. Zero signup, <15s.

Open scanner
Next.js · App Router & Pages Router · Passive Audit

Next.js Production Security Scanner

Audit live Next.js apps for __NEXT_DATA__ secret leaks, debug stack traces, exposed source maps, .env files, and missing security headers.

Open scanner
JS Bundles · Entropy + Context Validation · Passive Audit

Leaked API Key & Frontend Secret Scanner

Scan your live HTML and JavaScript bundles for leaked Stripe, OpenAI, Anthropic, Gemini, AWS, and GitHub keys—without false-positive noise.

Open scanner
Server Config · Dotfiles · Passive Audit

Exposed .env & .git File Checker

Check if your live website publicly exposes /.env, /.git/HEAD, or backup config files. Passive read-only URL scan with instant fixes. Zero signup.

Open scanner
Firebase · Firestore · Passive Audit

Firebase & Firestore Security Scanner

Passively audit live Firebase apps for leaked Admin SDK keys, exposed .env files, public source maps, and weak security headers without public apiKey noise.

Open scanner
Cursor · Lovable · Bolt · v0 · Passive Audit

Security Scanner for Vibe-Coded Apps

Free pre-launch security check for AI-built apps from Cursor, Claude Code, Lovable, Bolt, and v0. Catch leaked keys, open files, and missing headers.

Open scanner
JavaScript Bundles · .js.map · Passive Audit

Production Source Map Exposure Checker

Check if your live Next.js, Vite, or React app publicly exposes .js.map source maps. Passive URL scan with framework-specific fixes and AI prompts.

Open scanner