Ecommerce react app

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

Link to my webapp :

The server you are making the request to needs CORS configured to allow requests from your site.

@RandellDawson 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 = [

but your login page is attempting to access

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