当http://localhost是起源时致命的CORS
Access-Control-Allow-Origin:http://localhost
var xhr = new XMLHttpRequest();xhr.onload = function() { console.log('xhr loaded');};xhr.open('GET', 'http://stackoverflow.com/');xhr.send();
XMLHttpRequest cannot load http://stackoverflow.com/. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
HUWWW