Hi,
I made a fullstack app using vite for frontend and node.js for backend. So here is the problem. i had my frontend localhost:5173 and backend on localhost:5000. Then I uploaded my files to github and cloned them to render seperately for backend.So now i can say that my backend is on render They both went live but they can’t communicate. It says:
“Access to fetch at ‘https:/music-player-a8lg.onrender.com/api/login’ from origin ‘http:/localhost:5173’ has been blocked by CORS policy: Cannot parse Access-Control-Allow-Headers response header field in preflight response.Understand this error
Login.tsx:17
POST https:/music-player-a8lg.onrender.com/api/login net::ERR_FAILED”
I am stuck to this problem and tried everything there on youtube and chatgpt.