Skip to content

Blog · November 15, 2026

Does your API let any website use it?

A quick CORS fix can let any site call your API. Here's how to check and fix it.

When an AI tool hits a "CORS error," a common quick fix is to allow every website: Access-Control-Allow-Origin: *. The error goes away. But now any site can call your API from a visitor's browser. If your API also accepts logins or cookies, a bad site might read or change that user's data.

How to check:

  1. Search your code for Access-Control-Allow-Origin, cors(, or origin: "*".
  2. Look for settings that copy back whatever origin asks, or allow credentials for every site.
  3. List the sites that really need your API. Usually it's just your own domain.

To fix it, ask your AI tool: "Set CORS to allow only my own domain. Don't use a wildcard. Only allow credentials for that domain."

VibeVigil scans your live app for common security gaps. Try it free: https://vibevigil.com

A short note. Not a promise.

If you want to know about your own site, run the free scan.

Scan a site you own. It is free. No account.

You see the report first. Saving the site is optional.

No account. The report is the next page.

Free, no account. We fetch the public page, its scripts, and a few well-known paths.

Does your API let any website use it? · VibeVigil