Created
March 1, 2015 18:19
-
-
Save scizers/b620d1b805a5a03ec48c to your computer and use it in GitHub Desktop.
Cross Origin policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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