Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

CORS issue when calling JIRA "/status" endpoint

Guillaume Dupin September 26, 2024

We have confluence and JIRA hosted in our own AWS account.
In a confluence page, I am trying to fetch JIRA status but I face a CORS issue in the request.
although my confluence domain has been added to the JIRA whitelist.

I saw that the JIRA REST API supported CORS but what about the "/status" endpoint ?

1 answer

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2024

Are you using 

HTTP://<node_IP_address>:<port>/status

As mentioned in https://confluence.atlassian.com/enterprise/load-balancer-configuration-options-935383760.html

Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2024

Oh - you want to display the result of <jira>/status in a Confluence page?

Which Confluence macro are you using?

 

Guillaume Dupin September 27, 2024

Yes indeed, the goal is to display the JIRA status in a confluence page thanks to the ‘HTTP Response Json value’ Macro

Guillaume Dupin September 27, 2024

 

I suspect this issue to come from the missing CORS HTTP headers ("access-control-allow...") in JIRA response as mentionned here : https://jira.atlassian.com/browse/JRASERVER-59101
This fix was apparently done for multiple API endpoints that are listed to support CORS, but the "/status" endpoint is missing from the list.

Could it be the cause ?

Guillaume Dupin September 27, 2024

Here is the debug view :

Screenshot from 2024-09-27 12-17-08.png

Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2024

I'm not sure which add-on gives you the HTTP Response Json Value macro, but one thing to note is that the /status endpoint doesn't require HTTPS

What happens if you try http://JIRA_URL/status (rather than https://JIRA_URL/status) ?

Suggest an answer

Log in or Sign up to answer