extjs - Ajax call error during Rally sdk custom dashboard developement -
i'm getting 403 exception when make ajax call jenkins api call build details rally sdk custom html interface.
//ajax api call jenkins var blink ="https://[jenkinshost]/job/appdev/job/testproject/api/json"; ext.ajax.request({ url: blink, method :'get', crossdomain: true, withcredentials: true, headers : { 'authorization': 'basic dsasfsfxfhfj', 'content-type': 'application/json;charset=utf-8', }, success: function(response){ var backtojs=json.parse(response.responsetext); console.log('resp data-',backtojs); //console.log(backtojs['queryresult'].results); }, failure: function(response) { console.log('jenkins-ajax call failure'); } });
ajax call error-
response preflight request doesn't pass access control check: no 'access-control-allow-origin' header present on requested resource. origin 'https://rally1.rallydev.com' therefore not allowed access. response had http status code 403.
add .htaccess file on both domains string:
header add access-control-allow-origin "*"
and try find more information cross-domain requests.
Comments
Post a Comment