Next.js Discord

Discord Forum

On vercel.app I am receiving a CORS error.

Unanswered
Five-striped Sparrow posted this in #help-forum
Open in Discord
Five-striped SparrowOP
1. I am struggling to fetch real time weather from free weatherAPI, I am able to get the real time API from weatherAPI on local.host. However, when I try to fetch data on vercel.app on with the same code, it occurs CORS error. I am a beginner so please let me know if there is any information I am missing at any time.

2.posted in image.

3. On vercel.app, I am receiving CORS errors.

4. i have tried the following.
[Enabling CORS in a single Node.js Serverless Function]
[Enabling CORS in a Next.js App]
[Enabling CORS using vercel.json](https://vercel.com/guides/how-to-enable-cors#enabling-cors-using-vercel.json)

0 Replies