menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Node.js

A Spectrum community for Node.js ✨🐢🚀✨

Channels
Team

origin 'http://localhost:3000' has been blocked by CORS policy:

August 21, 2021 at 6:56pm

origin 'http://localhost:3000' has been blocked by CORS policy:

August 21, 2021 at 6:56pm
when I am sending data from react to node it give me this error Access to XMLHttpRequest at 'http://localhost:8000/create' from origin 'http://localhost:3000' 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. api.js:9 Error occur while posting data from client Error: Network Error xhr.js:177 POST http://localhost:8000/create net::ERR_FAILED. I know it's common error but I have already included the cors in my file but still it give me this error how can I fix this problem
No messages yet