Skip to content

Instantly share code, notes, and snippets.

@nurfarazi
Created December 3, 2015 11:13
Show Gist options
  • Save nurfarazi/35b1722cf8c698596daa to your computer and use it in GitHub Desktop.
Save nurfarazi/35b1722cf8c698596daa to your computer and use it in GitHub Desktop.
module.exports.apply = function(app) {
var CORS = require('connect-cors');
var options = {
origin: '*',
methods: ['GET', 'POST', 'PUT'],
headers: [
'Authorization',
'x-access-token'
],
credentials: false
};
app.use(CORS(options));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment