Post Deployment Erros

I delopyed backend on Render and frontend on Vercel, APIs are working great with third party providers like postman and hoppscoth but its’s giving errors on my application

/login:1 Access to XMLHttpRequest at ‘https://socialnet-dblr.onrender.com/login’ from origin ‘https://social-net-five.vercel.app’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Failed to load resource: net::ERR_FAILED

(Even I whitelisted my frontend origin)

Hi there,

Can you please check the networking tab and make sure those requests are not responding with a 502 status code? 502 responses come from our proxy and will not have the required CORS headers, which is why you see this error. 502 responses mean our proxy couldn’t connect to your service, or your service did not send a valid HTTP response. If this is the case, check for any unhealthy events on your service and check your application logs for errors.

Regards,

Keith
Render Support, UTC+10 :australia:

thanks