Created
October 22, 2018 00:21
-
-
Save Vheissu/d54073d5a60854c2a8e2c6c04e0b8282 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
const crossDomainHandler = (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