Cors issue

Guys im getting cors error while deploying Vercel/Render/Atlas Mongo ----my ecomm store? im a newbie and its giving me headache …pfa browser log…if anyone could help…i will share my github url…thank u so much ------------Frontend Initialization: index-DdSwvrhU.js:61:16338
Environment: production index-DdSwvrhU.js:61:16378
API Base URL: undefined index-DdSwvrhU.js:61:16417
Frontend Initialization Complete index-DdSwvrhU.js:61:16475
Environment Configuration config-NJMOSZJ0.js:1:66
Mode: production config-NJMOSZJ0.js:1:109
API_BASE_URL: https://tmp8-backend.onrender.com config-NJMOSZJ0.js:1:143
API_URL: https://tmp8-backend.onrender.com/api config-NJMOSZJ0.js:1:174
Initial props - Category: , Subcategory: ProductList-CEWqvk9D.js:1:364
Category/Subcategory changed. Resetting page to 1. ProductList-CEWqvk9D.js:1:446
Fetching products for page: 1, category: , subcategory: ProductList-CEWqvk9D.js:1:572
API_URL: https://tmp8-backend.onrender.com/api ProductList-CEWqvk9D.js:1:673
Initial props - Category: , Subcategory: ProductList-CEWqvk9D.js:1:364
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://tmp8-backend.onrender.com/api/products?page=1&limit=100&category=&subcategory=. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.
Error loading products: Network Error :1:145535
Initial props - Category: , Subcategory: ProductList-CEWqvk9D.js:1:364
GET
https://tmp8-frontend.vercel.app/assets/Banner-img1-B6X1OYOH.png
[HTTP/1.1 200 OK 0ms]

GET


[HTTP/1.1 200 OK 0ms]

Category: homeopathy Subcategory: dr reckeweg tinctures index-DdSwvrhU.js:61:8811
Initial props - Category: homeopathy, Subcategory: dr reckeweg tinctures ProductList-CEWqvk9D.js:1:364
Category/Subcategory changed. Resetting page to 1. ProductList-CEWqvk9D.js:1:446
Fetching products for page: 1, category: homeopathy, subcategory: dr reckeweg tinctures ProductList-CEWqvk9D.js:1:572
API_URL: https://tmp8-backend.onrender.com/api ProductList-CEWqvk9D.js:1:673
Initial props - Category: homeopathy, Subcategory: dr reckeweg tinctures ProductList-CEWqvk9D.js:1:364
Initial props - Category: homeopathy, Subcategory: dr reckeweg tinctures ProductList-CEWqvk9D.js:1:364
XHRGET
https://tmp8-backend.onrender.com/api/products?page=1&limit=100&category=homeopathy&subcategory=dr+reckeweg+tinctures
CORS Missing Allow Origin

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://tmp8-backend.onrender.com/api/products?page=1&limit=100&category=homeopathy&subcategory=dr+reckeweg+tinctures. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.
Error loading products: Network Error :1:145535
Initial props - Category: homeopathy, Subcategory: dr reckeweg tinctures ProductList-CEWqvk9D.js:1:364
Category: homeopathy Subcategory: adel tinctures index-DdSwvrhU.js:61:8811
Initial props - Category: homeopathy, Subcategory: adel tinctures ProductList-CEWqvk9D.js:1:364
Category/Subcategory changed. Resetting page to 1. ProductList-CEWqvk9D.js:1:446
Fetching products for page: 1, category: homeopathy, subcategory: adel tinctures ProductList-CEWqvk9D.js:1:572
API_URL: https://tmp8-backend.onrender.com/api ProductList-CEWqvk9D.js:1:673
Initial props - Category: homeopathy, Subcategory: adel tinctures ProductList-CEWqvk9D.js:1:364
XHRGET
https://tmp8-backend.onrender.com/api/products?page=1&limit=100&category=homeopathy&subcategory=adel+tinctures
CORS Missing Allow Origin

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://tmp8-backend.onrender.com/api/products?page=1&limit=100&category=homeopathy&subcategory=adel+tinctures. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.
Error loading products: Network Error :1:145535
Initial props - Category: homeopathy, Subcategory: adel tinctures ProductList-CEWqvk9D.js:1:364

Hi, @persprojs! Welcome to the Vercel Community :waving_hand:

We created this thread which may be helpful! Let us know how you get on.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.