Why Your Axios Call Fails with a CORS Error (Even When the URL Works in the Browser)
The Bug
I was trying to fetch daily horoscopes from a public API:
https://horoscope-app-api.vercel.app/api/v1/get-horoscope/daily?sign=Virgo&day=TODAY
Pasting the URL into the browser worked perfectly. I could see a JSON response like this:
{
"data...
swc-or-babel.hashnode.dev2 min read