title: Why am I seeing an "origin is not allowed by Access-Control-Allow-Origin" error here?
body: <p>I am seeing the following error:</p>
  
  <pre><code>Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin
  </code></pre>
  
  <p>with this code:</p>
  
  <pre><code>var http = new getXMLHttpRequestObject();
  var url = "http://gdata.youtube.com/action/GetUploadToken";
  var sendXML = '&lt;?xml version="1.0"?&gt;&lt;entry xmlns="http://www.w3.org/2005/Atom"'+
      'xmlns:media="http://search.yahoo.com/mrss/'+
      'xmlns:yt="http://gdata.youtube.com/schemas/2007"&gt;'+
      '&lt;media:group&gt;&lt;media:title type="plain"&gt;My First API&lt;/media:title&gt;'+
      '&lt;media:description type="plain"&gt;First API&lt;/media:description&gt;'+
      '&lt;media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat"&gt;People&lt;/media:category&gt;'+
      '&lt;media:keywords&gt;first, api&lt;/media:keywords&gt;&lt;/media:group&gt;&lt;/entry&gt;';
  http.open("POST", url, true);
  http.setRequestHeader("Authorization", "AuthSub token=" + AccessToken);
  http.setRequestHeader("X-GData-Key", "key="+ dev_key);
  http.setRequestHeader("Content-Type", "application/atom+xml; charset=UTF-8");
  
  http.onreadystatechange = function() {
      if(http.readyState == 4) {
          alert(http.responseXML);
      }
  }
  http.send(sendXML);
  </code></pre>
  
  <p>What can cause this, and how do I solve it?</p>