Skip to content

Instantly share code, notes, and snippets.

@zirosas
Created March 12, 2014 09:57
Show Gist options
  • Save zirosas/9503975 to your computer and use it in GitHub Desktop.
Save zirosas/9503975 to your computer and use it in GitHub Desktop.
app.all('/', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
});
app.get('/', function(req, res, next) {
// Handle the get for this route
});
app.post('/', function(req, res, next) {
// Handle the post for this route
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment