Created
September 13, 2016 21:00
-
-
Save thiagojedi/2cb3dca54f1eeffbf963aaeec07d3f48 to your computer and use it in GitHub Desktop.
Documento de exemplo de Cross domain
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.set('json spaces', 4); | |
app.use(function (req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With"); | |
res.contentType('json'); | |
next(); | |
}); | |
res.jsonp(resultado); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment