Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cross #origin #node
ADD COMMENT
Topic
Name
8+7 =