javascript - why would akamai change browser security behavior? -
javascript - why would akamai change browser security behavior? -
in 1 environment have x-domain jquery ajax request method get. nil fancy.
jquery.ajax({ type: 'get', url: url, contenttype:'text/plain', xhrfields: { withcredentials: true }, success: function(data){ //stuffff } });
works fine when served tomcat or apache. stays get, not preflighted options
get https://qa.example.com http/1.1 host: somehost.example.com connection: keep-alive cache-control: no-cache pragma: no-cache accept: */* origin: http://example.com user-agent: mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/36.0.1985.125 safari/537.36 content-type: text/plain dnt: 1 referer: http://example.com accept-encoding: gzip,deflate,sdch accept-language: en-us,en;q=0.8,sr;q=0.6 cookie: jsessionid=xxx
but when static files hosted on akamai (in different environment), request gets preflighted options using same exact js.
options https://stage.example.com http/1.1 accept: */* origin: https://someorigin.example.com access-control-request-method: access-control-request-headers: content-type, take accept-encoding: gzip, deflate user-agent: mozilla/4.0 (compatible; msie 7.0; windows nt 6.1; wow64; trident/7.0; slcc2; .net clr 2.0.50727; .net clr 3.5.30729; .net clr 3.0.30729; media center pc 6.0; .net4.0c; .net4.0e; infopath.3) host: test-me.example.com content-length: 0 connection: keep-alive cache-control: no-cache
what on earth create browser treat x-domain request's security differently because hosted on cdn? (we custom dns akamai files, if coming our domain). also, note server in situation not allowing options , don't have access, should not matter simple gets without data, per these rules:
simple requests requests meet next criteria: • http method matches (case-sensitive) 1 of: head post • http headers matches (case-insensitive): take accept-language content-language last-event-id content-type, if value 1 of: • application/x-www-form-urlencoded • multipart/form-data • text/plain
this happens regardless of browser, chrome, ie, ff simple requests.
javascript jquery google-chrome xmlhttprequest cors
Comments
Post a Comment