Skip to content

Instantly share code, notes, and snippets.

@scizers
Created March 1, 2015 18:19
Show Gist options
  • Save scizers/b620d1b805a5a03ec48c to your computer and use it in GitHub Desktop.
Save scizers/b620d1b805a5a03ec48c to your computer and use it in GitHub Desktop.
Cross Origin policy
app.get('/questions/intTags' , function (req ,res) {
console.log(req.query.data)
var data = [
{ "text": "Tag1" },
{ "text": "Tag2" },
{ "text": "Tag3" },
{ "text": "Tag4" },
{ "text": "Tag5" },
{ "text": "Tag6" },
{ "text": "Tag7" },
{ "text": "Tag8" },
{ "text": "Tag9" },
{ "text": "Tag10" }
];
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
res.json(data)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment