In plain words
CORS is a browser rule: a page on one website can only read replies from another website's API if that API says the first site is allowed.
Where you see it
Your Lovable app calls a Supabase Edge Function and the console says "blocked by CORS policy: No 'Access-Control-Allow-Origin' header". The request often reached the server; the browser refused to let your page read the reply.
What goes wrong
- Allowing every website to silence the error
A * origin trusts every site on the internet, which is rarely what you meant. Echoing back whatever origin asks while allowing cookies is worse.
"Access-Control-Allow-Origin": "*" - Thinking CORS protects your API
Only browsers obey CORS. A script, curl or Postman ignores it completely, so your server still needs login and permission checks.
- Fixing it in the browser code
The agent adds mode: "no-cors" to the fetch call. The error goes away and so does your data, because the reply comes back empty.
fetch(url, { mode: "no-cors" })
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's API has strict CORS settings. Can someone still call it with curl from their laptop?