title: Access-Control-Allow-Origin not allowed
body: <p>Why to I get this error when the URL already is in the <code>Access-Control-Allow-Origin</code> header!?</p>
  
  <h1>error</h1>
  
  <pre><code>XMLHttpRequest cannot load http://cdn.localhost/data/voucher/16_ead32751b66fd6c7856b7db0e186574df37a7d08.pdf. Origin http://secure.localhost is not allowed by Access-Control-Allow-Origin.
  Refused to get unsafe header "Accept-Ranges"
  </code></pre>
  
  <h1>htaccess (cdn.localhost)</h1>
  
  <pre><code>Header add Access-Control-Allow-Origin "http://secure.localhost"
  </code></pre>