Note that there are some explanatory texts on larger screens.

plurals
  1. PORefused to get unsafe header "Content-Range"
    primarykey
    data
    text
    <p>For some reason I cannot access the response header of "Content-Range" anymore... Therefore it's impossible to determine the file size of a resource using XHR. I get error <code>Refused to get unsafe header "Content-Range"</code> on Chrome in this line:</p> <pre><code>var cr = this.getResponseHeader('Content-Range'); </code></pre> <p>Here's the CORS config:</p> <pre><code>&lt;?xml version="1.0" ?&gt; &lt;CorsConfig&gt; &lt;Cors&gt; &lt;Origins&gt; &lt;Origin&gt;*&lt;/Origin&gt; &lt;/Origins&gt; &lt;Methods&gt; &lt;Method&gt;GET&lt;/Method&gt; &lt;Method&gt;HEAD&lt;/Method&gt; &lt;Method&gt;DELETE&lt;/Method&gt; &lt;/Methods&gt; &lt;ResponseHeaders&gt; &lt;ResponseHeader&gt;x-goog-meta-foo1&lt;/ResponseHeader&gt; &lt;ResponseHeader&gt;origin&lt;/ResponseHeader&gt; &lt;ResponseHeader&gt;range&lt;/ResponseHeader&gt; &lt;ResponseHeader&gt;Content-Range&lt;/ResponseHeader&gt; &lt;ResponseHeader&gt;Content-Length&lt;/ResponseHeader&gt; &lt;/ResponseHeaders&gt; &lt;MaxAgeSec&gt;1800&lt;/MaxAgeSec&gt; &lt;/Cors&gt; </code></pre> <p></p> <p>CURL output:</p> <pre><code>$ curl -H "Origin: http://peer5.com" http://commondatastorage.googleapis.com/peer5_vod/wind2_orig.mp4 -s -D - -o /dev/null HTTP/1.1 200 OK Server: HTTP Upload Server Built on May 8 2013 16:51:19 (1368057079) Expires: Mon, 13 May 2013 09:47:40 GMT Date: Mon, 13 May 2013 08:47:40 GMT Cache-Control: public, max-age=3600, no-transform Last-Modified: Fri, 22 Mar 2013 17:09:47 GMT ETag: "755232ae8fef22bc7b4e9510a68a646e" x-goog-generation: 1363972188238000 x-goog-metageneration: 2 Content-Type: video/mp4 x-goog-hash: crc32c=pZmS2Q== x-goog-hash: md5=dVIyro/vIrx7TpUQpopkbg== Accept-Ranges: bytes Content-Length: 15535795 Access-Control-Allow-Origin: * Access-Control-Expose-Headers: Content-Length, Date, Server, Transfer-Encoding </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload