Skip to content

Instantly share code, notes, and snippets.

@ubergoober
Created January 16, 2015 18:39
Show Gist options
  • Select an option

  • Save ubergoober/13a0a45be5eec1db1ac6 to your computer and use it in GitHub Desktop.

Select an option

Save ubergoober/13a0a45be5eec1db1ac6 to your computer and use it in GitHub Desktop.
Disable CORS on Express.js
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment