Ecommerce react app

In my ecommerce webapp when i tired logging in this shows errors as show in the picture.

Link to my webapp :
sushil-ecommerce-admin.on.fleek.co

@camperextraordinaire Can you show me how I can fix this problem.

Do some research on how to allow sites access using CORS with Node Express application. You whitelist the following:

const whitelist = [
  'https://sushil-ecommerce-admin.on.fleek.co/',
  'http://127.0.0.1:5500',
  'http://localhost:4000',
  'http://localhost:3000',
]

but your login page is attempting to access https://ecommerce-admin-api.vercel.app

In your client app, I see:

const loginUrl = `${process.env.REACT_APP_API_URL}auth/login`

I suggest updating REACT_APP_API_URL to be a domain you have whitelisted.

1 Like

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