Deadly CORS when http://localhost is the origin
问题 I am stuck with this CORS problem, even though I set the server (nginx/node.js) with the appropriate headers. I can see in Chrome Network pane -> Response Headers: Access-Control-Allow-Origin:http://localhost which should do the trick. Here's the code that I now use to test: var xhr = new XMLHttpRequest(); xhr.onload = function() { console.log('xhr loaded'); }; xhr.open('GET', 'http://stackoverflow.com/'); xhr.send(); I get XMLHttpRequest cannot load http://stackoverflow.com/. Origin http:/