Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Enabling CORS for Bamboo


Bamboo version: 7.0.2
OS: RHEL 7.5

I have been attempting to make a separate HTML5 webpage for quick information consumption about the state of deployments (finished, failed, current release, etc) from Bamboo by using the REST API, but for the life of me cannot get anything to come through a request. Getting the information straight from the REST url works like a charm, but when it comes to using that in a fetch() or XmlHttpRequest, it's always blocked; I'm not sure if it's server-side or client-side that has the wrong configuration. 

I've tried the configurations from this infamous topic and the links in it as well: and they haven't helped at all.

Trying to use the third-party CORS filter in the WEB-INF/lib results in a catastrophic failure to start (the information is for JIRA anyway- Bamboo doesn't have a whitelist in the UI?).

The conf/web.xml changes are very much a hit and/or miss for what actually is needed for it to work. In my current version, I just place about everything to see what would have an positive effect on getting the information.

In conf/web.xml:

<param-value>GET, POST, HEAD, OPTIONS, PUT</param-value>
<param-value>Accept, Authorization, Origin, Content-Type, X-Requested-With, Cookie, Access-Control-Allow-Headers, Access-Control-Request-Headers, Access-Control-Expose-Headers</param-value>
<param-value>Access-Control-Allow-Origin, Access-Control-Allow-Credentials</param-value>

In main.js:

headerInfo = new Headers();
headerInfo.append("Origin", "");
headerInfo.append("Content-Type", "application/json");
headerInfo.append("Authorization", "Basic abcde12345");

var requestOptions = {
method: 'GET',
headers: headerInfo,
redirect: 'follow',
mode: 'cors'

fetch("http://localhost:8085/rest/api/latest/deploy/environment/1015809/results?expand=results.result&max-results=1", requestOptions)
.then(response => response.text())
.catch(error => console.log('There was an error!', error))
.then(result => console.log(result));

I've tried this locally and on my existing server before, but still without any luck.


Is there a clear configuration guide for a default Bamboo installation that enables server-side CORS correctly so I can utilize the REST API? Or has someone else gotten this to work in the (recent) time with a newer version?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 9.0 is now available

Hey there, Data Center community! I'm Martyna Wojtas and I am the Product Manager for Bamboo Data Center. I’m excited to share that Bamboo 9.0 is now available. We purpose-built this platform to help...

317 views 0 7
Read article

Atlassian Community Events