Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

access-to-xmlhttprequest-has-been-blocked-by-cors-policy

app.use(function (request, response, next) {
  response.header("Access-Control-Allow-Origin", "*");
  response.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+8 =