---
title: "CORS Checker: Live Preflight & Header Test · camada"
description: "Test live API URLs for CORS preflight errors, or paste response headers. Catch wildcard credential bugs, reflected origins, and missing Vary: Origin."
url: https://www.camada.app/tools/cors-checker
last_updated: 2026-11-19
---

# Test CORS preflight headers and origin rules

Enter an API URL and caller `Origin` to run a live `OPTIONS` preflight and header probe from our Worker. Or paste `curl -i` headers in your tab. Catch reflected origin leaks, wildcard credential bugs, and missing `Vary: Origin` rules.

- [Run live CORS probe](https://www.camada.app/tools/cors-checker#probe)
- [Export allowlist config](https://www.camada.app/tools/cors-checker#exporter)
- [CORS header reference](https://www.camada.app/tools/cors-checker#reference)
- [All developer tools](https://www.camada.app/tools)

## Probe a live API endpoint or paste curl -i headers

Browser DevTools hides status codes and headers when CORS fails. Our Worker sends the `OPTIONS` preflight and `Origin` request from the edge so you see every header returned.

## CORS binds browsers while camada guards your routes

CORS headers tell a browser whether cross-site scripts may read a response. Shell tools, Python scrapers, and login bots skip CORS checks. Headless browsers on your own page skip them too. Lock down CORS to protect logged-in browsers. Then add `camada` inside your API to catch bad actors hitting your routes.

### Test OPTIONS preflights from a terminal

Send `Origin` and `Access-Control-Request-Method` headers with `curl` to inspect localhost or staging APIs.

terminal · curl preflight

```sh
curl -sSI -X OPTIONS https://api.example.com/v1/me \
  -H "Origin: https://app.example.com" \
  -H "Access-Control-Request-Method: POST" \
  -H "Access-Control-Request-Headers: authorization, content-type"
```

http · allowlisted CORS

```http
Access-Control-Allow-Origin: https://app.example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: authorization, content-type
Access-Control-Max-Age: 600
Vary: Origin
```

1

### CORS protects browsers, not your API routes

Only web browsers run CORS checks and OPTIONS preflights. Attackers running curl, Python, Go, or Node scripts skip preflights. They read every byte your API sends.

[See how camada stops API and web scraping](https://www.camada.app/use-cases/scraping)

2

### Same-origin /_cam/b.js needs zero CORS rules

camada mounts its beacon and 16-bit SHA-256 challenge on your own origin. Your frontend never makes cross-origin bot-widget calls. Your CORS and CSP rules stay simple.

[Explore first-party in-app bot detection](https://www.camada.app/bot-detection)

3

### Link wire signals with track() outcomes

A valid Origin header can still come from a bot or proxy. Watchkeeper links wire headers, browser checks, and track('login_failed') events in memory.

[Read the credential stuffing defense guide](https://www.camada.app/use-cases/credential-stuffing)

- [Website security & cookie scanner](https://www.camada.app/tools/website-security-check)
- [CSP & HTTP headers check](https://www.camada.app/tools/security-headers)
- [JWT decoder & verifier](https://www.camada.app/tools/jwt-decoder)
- [Live bot signal test](https://www.camada.app/tools/bot-test)
- [All 14 frameworks](https://www.camada.app/frameworks)
- [Compare with WAFs and CAPTCHAs](https://www.camada.app/compare)

SDK guides: [Cloudflare, no code](https://www.camada.app/docs/cloudflare) · [Hono on Workers](https://www.camada.app/docs/hono) · [Python](https://www.camada.app/docs/python) · [Go SDK](https://www.camada.app/docs/go) · [PHP](https://www.camada.app/docs/php) · [Ruby](https://www.camada.app/docs/ruby) · [Java](https://www.camada.app/docs/java) · [.NET](https://www.camada.app/docs/dotnet)

## CORS response headers and misconfiguration risks

Browsers send an `OPTIONS` preflight before cross-origin calls that use `PUT`, `DELETE`, `application/json`, or `Authorization` headers.

### 1. Access-Control response headers

Core Fetch headers that control cross-origin reads, cookies, caching, and exposed headers.

| Header | Recommended value | Browser Fetch behavior |
| --- | --- | --- |
| Access-Control-Allow-Origin | `https://app.example.com (or * on public APIs)` | Names the single origin (or *) permitted to read the response body in JavaScript. |
| Access-Control-Allow-Credentials | `true (only with an explicit origin allowlist)` | Lets browsers attach cookies or TLS client certs and read the response. |
| Access-Control-Allow-Methods | `GET, POST, PUT, DELETE` | Tells preflight checks which HTTP methods cross-origin callers may send. |
| Access-Control-Allow-Headers | `authorization, content-type` | Approves custom or non-safelisted request headers during OPTIONS preflight. |
| Access-Control-Expose-Headers | `x-request-id, ratelimit-remaining` | Lets frontend code read custom response headers on res.headers.get(). |
| Access-Control-Max-Age | `600 (10 minutes) up to 7200 in Chromium` | Caches the OPTIONS preflight result so repeat calls skip the extra round-trip. |
| Vary | `Origin (plus Access-Control-Request-Headers on preflight)` | Stops shared CDN caches from serving one origin header to a second origin. |

### 2. Common CORS bugs and security leaks

These mistakes either break frontend calls or leak user data to outside sites.

| Misconfiguration | Impact | Fix |
| --- | --- | --- |
| Reflecting untrusted Origin + Allow-Credentials: true | Any attacker webpage can fetch private user JSON with victim cookies. | Match req.headers.origin against a strict allowlist Set before echoing it. |
| Access-Control-Allow-Origin: * + Allow-Credentials: true | Fetch spec rejects the response in every browser with a CORS error. | Return one exact allowlisted origin when you enable credentials. |
| Access-Control-Allow-Origin: null | Sandboxed iframes and data: documents send Origin: null and can steal data. | Never add null to your origin allowlist. |
| 301, 302, or 307 redirect on OPTIONS preflight | Browsers abort preflight redirects, often on http-to-https or trailing-slash hops. | Point fetch() at the final HTTPS URL and answer OPTIONS before redirects. |
| Dynamic Allow-Origin without Vary: Origin | CDNs cache the first caller origin and break CORS for other valid origins. | Always send Vary: Origin whenever Allow-Origin is not a static *. |
| Wildcard * on Authorization header without credentials | In Fetch, * never covers Authorization unless Allow-Headers names it. | Add authorization by name inside Access-Control-Allow-Headers. |

## Questions about CORS and API security

Exposing JSON routes for logins, checkouts, or AI features? Read our [security overview](https://www.camada.app/security) or review [plans and limits](https://www.camada.app/pricing).

**Why can this tool read failed CORS headers when browser DevTools hides them?**

When cross-origin fetch() fails CORS, browsers hide status codes and headers. Our Worker sends the OPTIONS preflight and Origin probe from the edge. It shows the exact Access-Control-Allow-* headers and redirects your API sent.

**Why does Access-Control-Allow-Origin: * fail when a request sends credentials?**

Browsers block cookie requests when a server answers with a wildcard * origin. Otherwise any site could read private data with a user cookie. Echo one allowlisted origin in Access-Control-Allow-Origin and add Vary: Origin.

**Why is reflecting the request Origin header with Allow-Credentials dangerous?**

Suppose your API copies any Origin header into Access-Control-Allow-Origin with Allow-Credentials: true. Any attacker page can then call your API with user cookies and read private data. Always check incoming origins against a fixed allowlist.

**Why do I need Vary: Origin on dynamic CORS responses?**

Suppose your API sends two Access-Control-Allow-Origin headers for two allowed domains. Without Vary: Origin, a CDN cache can save the first header and serve it to the second domain. Sending Vary: Origin keys the cache by caller origin.

**Does a strict CORS policy stop API scraping or credential stuffing?**

No. Only web browsers run CORS checks and preflights. Scripts in curl, Go, Python, or Node skip preflights and read every byte. Add an in-app SDK like camada to spot failed logins and API abuse.

## Use it from an AI agent

This page is also Markdown at [/tools/cors-checker.md](https://www.camada.app/tools/cors-checker.md). The check itself runs from the form on this page.

The MCP server needs no key. Every agent tool on this site is listed in the [server card](https://www.camada.app/.well-known/mcp/server-card.json) and on [the tools page](https://www.camada.app/tools#agents).

## Related tools

- [CSP & security headers](https://www.camada.app/tools/security-headers)

  Fetch live response headers or paste curl output. Flag unsafe-inline CSP rules, check HSTS and nosniff, and hash inline scripts.
- [JWT decoder](https://www.camada.app/tools/jwt-decoder)

  Decode JOSE headers and payload claims in your tab with zero network calls. Verify HS256, RS256, and ES256 signatures and flag alg:none.
- [Website security check](https://www.camada.app/tools/website-security-check)

  Enter a URL to trace HTTPS redirects, check CSP and OWASP headers, and audit cookie flags. Also checks robots.txt, llms.txt, and security.txt.

[All free tools](https://www.camada.app/tools)

## Stop the API bots that ignore CORS rules.

Install the SDK on the Free plan to score 100,000 events a month with no card. Turn on blocks and SHA-256 challenges on Starter ($59/month) or Growth ($249/month).

[Get started free](https://my.camada.app/) [In-app bot detection](https://www.camada.app/bot-detection) [Anti-scraping guide](https://www.camada.app/use-cases/scraping) [See pricing](https://www.camada.app/pricing)

Free needs no card. A 14-day trial of Starter or Growth needs a card. Nothing is charged today. Cancel before the trial ends (the date is shown in the app) and you pay nothing. Otherwise the plan's monthly price starts on day 15.

## Sitemap

[Every page on this site](https://www.camada.app/sitemap.md)
