Created
December 3, 2015 11:13
-
-
Save nurfarazi/35b1722cf8c698596daa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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