Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cross Domain HTTP request from browser

techrhythm September 10, 2013

I would like to add a page on our intranet which contains some information pulled from JIRA. I would like a way to do this client side. Is this possible?

Normally, this would be done using JSONP, but It looks like JSONP has been disabled due to security concerns (which does make some sense).

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
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 11, 2013

If jsonp isn't working you're out of luck without doing something server side.

You could provision a web service on your app server that requests the content you need from Jira server side using the Jira api and then serves it to the client as straight JSON or XML from the same domain. In this way you can then restrict what data you expose to your application, just providing a subset of whatever the app server can access (I assume you'll use a service account or something to permit the app to use the Jira API).

If you want to fully emulate cross domain access to the api, you could just an apache ProxyPass directive a subdirectory of your webapp such that all requests to yourapp/rest/ are proxied through to jira/rest/ or something.

techrhythm September 12, 2013

Thanks for the reply Sam. I was thinking this might be able to be done with CORS, but it looks as if maybe it isn't supported yet in OnDemand:

https://answers.atlassian.com/questions/167909/is-the-jira-rest-api-still-serving-jsonp

TAGS
AUG Leaders

Atlassian Community Events