Failed requests from my front to my heroku server [closed]

I’ve a problem with my server on Heroku.

It actually works (as if i put the URL on my browser, I will obtain a response and a json) but when I put the URL of my server inside my useEffect in my front (host locally), it does not work anymore and worst, it crash my server.

I checked the console from my browser and it says :

from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Which I don’t understand as I’ve installed cors in my backend

  • 1

    Instead of describing your code, show it to us. Please edit a minimal reproducible example into your question as one or more code blocks. You may also want to take the tour and read How to Ask.

    – 




Leave a Comment