Cors problem in my app

cors problem in my app.The render platform cant connect to my backend and mongo db database

this is my github repo
a section of my cors
const corsOptions = {
origin:“https://xaviers-mern-blog.onrender.com”,
methods: “GET,HEAD,PUT,PATCH,POST,DELETE”,};
app.use(cors(corsOptions));

test credentials
username xyvielyons@gmail.com
pasword 1234

Hi,

You console is showing references to a 127.0.0.1/local URL that looks incorrect. You would need to update your frontend code to call your deployed backend.

Alan

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