Start a new topic

try add custom header

 http://codepen.io/Viblast/pen/qNZmYj


your code, how to set additional header, when i try add header:

ev.xhr.setRequestHeader("MyHeader","test");

 Player will send header:

Access-Controll-Request-Header: MyHeader;

 what i need do, to take this header: MyHeader:test?

1 Comment

Hi,

This is a CORS issue and what you see is the OPTIONS request before the original one. The player does not perfrom it, but the browser must send an OPTIONS request in order to ask the server if the custom headers are allowed.

If the server allows custom headers the browser performs the actual request with the custom header(s) included.

You can read more about CORS here.



Login to post a comment