Answer the question
In order to leave comments, you need to log in
What is the method to bypass the same origin policy?
There is a folder. In the folder there is a simple node.js server running on port 8888 and a client.js file from which I want to make an ajax request to the server. Seim Orizhn policy does not let me through. I read about JsonP, manifest.json, about headers, but it was not possible to apply Google. I would be happy for a ready-made example using any method to bypass the seim origin policy or for an sensible article / book / blog that describes how to do it
Answer the question
In order to leave comments, you need to log in
You only need to add settings in the headers of the response (valid for express) that
allow access
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question