Answers for "cross-origin request blocked the same origin policy disallows reading the remote resource fix in node js node js"

0

cross-origin request blocked the same origin policy disallows reading the remote resource fix in node js node js

app.use(function (req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
res.setHeader('Access-Control-Allow-Credentials', true);
next();
});
Posted by: Guest on May-15-2021

Code answers related to "cross-origin request blocked the same origin policy disallows reading the remote resource fix in node js node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language