Next.js Discord

Discord Forum

I am struggling with CORS (i know, i know), Vercel and Supabase

Unanswered
Atlantic mackerel posted this in #help-forum
Open in Discord
Atlantic mackerelOP
I feel like i have exhausted all my means for trying to solve this. Claude 3.7 and Gemini 2.5 Pro haven't been able to solve.

My current CORS issue is: Access to fetch at 'https://wblareporting-backend-dev.vercel.app/api/health-check' from origin 'https://wblareporting-dev.vercel.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I have both a front end and backend deployment in Vercel. I'm using the free version currently. All environments are correct, Github is pushing the develop branch to preview and main to production.

I can view locally, still with CORS errors, but can't get past our current login screen due to the errors.

What would you need to see to assist my exhausted self to help solve for this?

6 Replies

if you're using express in backend just install cors package and do app.use(cors())
every other framework will have a similar setup
Atlantic mackerelOP
We already have a complete CORS configuration setup using through our middleware, and have settings aligned in our server, app.js and have created vercel.json and vercel.develop.json files to cover these with the correct apis.
American black bear
You haven't exhausted all your means, ChatGPT 5.0 is coming soon it will surely be able to fix this :D
But until then can you share your cors configuration for your backend?
Atlantic mackerelOP
CORS issue solved. Found out it was my own fault with having the Vercel Authentication on for deployments.