Skip to content

Instantly share code, notes, and snippets.

@thiagojedi
Created September 13, 2016 21:00
Show Gist options
  • Save thiagojedi/2cb3dca54f1eeffbf963aaeec07d3f48 to your computer and use it in GitHub Desktop.
Save thiagojedi/2cb3dca54f1eeffbf963aaeec07d3f48 to your computer and use it in GitHub Desktop.
Documento de exemplo de Cross domain
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