Answers for "enable cors for every origin nodejs"

5

allow cross origin node

app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});
Posted by: Guest on April-23-2020

Code answers related to "enable cors for every origin nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language