Created
October 22, 2018 00:19
-
-
Save Vheissu/2d7dc5154327259a4aaf074fea211cfb to your computer and use it in GitHub Desktop.
This file contains 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
var crossDomainHandlers = (req, res, next) => { | |
res.header('Access-Control-Allow-Origin', 'http://localhost:8080/'); | |
res.header('Access-Control-Allow-Credentials', true); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
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