mercredi 24 novembre 2021

API - CORS error "The form is not connected"

I'm trying to create an API and I'm figuring out with this issue since a week and try everything. My frontend is set on 8081 port and backend on 3000 port.

Here is the console error :

login:1 Form submission canceled because the form is not connected
login:1 Access to XMLHttpRequest at 'http://localhost:3000/api/auth/login' from origin 'http://localhost:8081' 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.

Just to said I tried many things present on threads but nothing work for me. Do you have any idea guys?




Aucun commentaire:

Enregistrer un commentaire