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

How to enable CORS on CentOS Apache

Edward Kim August 4, 2015

Hi, I'm trying to connect my company's JIRA host name with Nuxeo's open source RoadMap, and unfortunately I have not been able to get it working. So far I've added the host web address to JIRA's whitelist as an admin. Then I modified the httpd.conf and ssl.conf files to make sure it includes https, but Firefox FireBug is informing me with a warning that the "Cross-Origin Request Blocked: The same origin policy disallows reading the remote resource at https://jira.my.company.hostname/rest/api/latest/project/myProject/versions. This can be fixed by moving the resource to the same domain or enabling CORS."

For when I access https://jira.my.company.hostname/rest/api/latest/project/myProject/versions and https://jira.my.company.hostname/rest/api/latest/project/MyProject/components, I see arrays of information and it does work. However, my webpage cannot seem to connect with JIRA.

As for the httpd.conf, I have followed this website: http://www.webcodegeeks.com/web-servers/cors-and-how-to-enable-it-in-apache-web-server/ and it still hasn't worked.

I was wondering what am I doing wrong and what else is missing. Any help would be appreciated thank you!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
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.
August 4, 2015

Your RoadMap web server should return "Access-Control-Allow-Origin: https://jira.my.company.hostname" header along with the page that triggers request to your JIRA. You can inspect tnis with FireBug as well.

If the Access-Control-Allow-Origin is not present, then you did something wrong with your RoadMap apache. Here is result of my quick googling: http://superuser.com/questions/811907/apache-add-access-control-allow-origin-header If still troubles with apache, please ask on some system administration forum like http://serverfault.com/

 

TAGS
AUG Leaders

Atlassian Community Events