DEV Community

GitMan
GitMan

Posted on

How I Fixed a CORS Error Without Knowing Backend - and What I Learned From It

I recently built a website called IsItDown - https://is-it-down-gitman.vercel.app/ - that checks whether popular sites and services around the world are up or down in real time, refreshing live data every 30 seconds.
Everything was going smoothly until I hit a wall - a CORS error.
Since I have very little backend knowledge, my initial approach was fetching data directly through the browser. That's when things broke. Every solution I found pointed to the same answer - move the fetching to the backend. But that wasn't really an option for me at the time since backend coding is still new territory for me.
So I had to find a middle way.
After some research, I discovered Vercel Serverless Functions. Instead of fetching from the browser, I let Vercel's server handle the API calls and pass the response back to my site. The result? I was fetching from 30+ sources in just 1–2 seconds, with zero CORS issues.
It wasn't a perfect textbook solution - but it worked, and more importantly, I understood why it worked.
That's the thing about building real projects. You don't just write code - you hit real problems, think your way through them, and walk away with knowledge that no tutorial could've given you.

Top comments (0)