Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Origin http://localhost:3002 is not allowed by Access-Control-Allow-Origin.

var allowCrossDomain = function(req, res, next) {
    res.header('Access-Control-Allow-Origin', "*");
    res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
    res.header('Access-Control-Allow-Headers', 'Content-Type');
    next();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Origin #allowed
ADD COMMENT
Topic
Name
4+6 =