Preflight of cross domain Ajax with custom header (using jquery) always getting cancelled -


i trying make cross domain post custom headers, preflight getting cancelled (that's word in chrome's "inspect element" panel >> "network" label), , cannot tell whether cancelled browser or jquery. code is:

var request = $.ajax({     'type'        : 'post',     'crossdomain' : true,     'url'         : 'https://host.domain/some_path',     'data'        : {'some_key': 'some_value'},     'headers'     : {         'authorization'        : 'custom-method credential_id:credential_secret',         'x-some-custom-header' : '2013-05-02'     } }) .done(function(blah){blah}) .fail(function(blah){blah}); 
  • if remove headers object, or set {}, request can made successfully.
  • if remove authorization header, preflight still cancelled.

i don't think it's server-side issue, because there nothing options request method in server's log. think preflight request never been made.

so, idea?

thanks in advance.

figured out: it's problem credential used in https, nothing codes.
generated server credential myself, need tell browser trust credential.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -