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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -