Access to XMLHttpRequest at 'localhost:3000/users' from origin 'http://localhost:62521' has been blocked by CORS policy

Issue I am getting this error even though I have allowed CORS in my code. This one is in Node js: app.use(cors()); app.get(‘/users’, (req, res) => { res.set({ ‘Access-Control-Allow-Headers’: ‘*’, ‘Access-Control-Allow-Methods’: ‘POST,GET,DELETE,PUT,OPTIONS’ }); User.find({}, function(err, users){ if(err) { return res.status(500).send({err});

Continue reading