i have installed jenkins on ubuntu server apt-get.
my jenkins had secure requester whitelist plugin.
so can use javascript jsonp access jenkins json api on localhost (different domain jenkins server) successfully.
the javascript code looks this:
p id="id"></p> <script type="text/javascript"> function display(data){ document.getelementbyid("id").innerhtml = data.number; } </script> <script type="application/javascript" src="http://$myjenkinshost/job/$myjob/lastbuild/api/json?jsonp=display"> </script>
but after added javascript sonarqube plugin. javascript can't access jenkins json anymore. jenkins responded http request with:
[error] failed load resource: server responded status of 403 (jsonp forbidden; implement jenkins.security.securerequester)
but if turnoff enable security checkbox on jenkins configure global security setting, javascript in sonarqube plugin can access jenkins json successfully.
why jenkins disable sonarqube access json object?
does jenkins forbid http request referrer?
the http request sonarqube had referrer on http://localhost:9000.
is there setting on jenkins can avoid following error? [error] failed load resource: server responded status of 403 (jsonp forbidden; implement jenkins.security.securerequester)
Comments
Post a Comment