JIRA issue collector https

We have changed our JIRA server to run behind a nginx that strips https, and send the request to JIRA via http. And we also changed the JIRA base URL to https://.

An error occurs when calling the issue collector:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://jira.ourserver.com') does not match the recipient window's origin ('https://jira.ourserver.com').

When the baseURL is changed to https:// i would suppose that it would be changed in the javascript requested by the jQuery.ajax call.

How can we fix this issue?

 

5 answers

1 accepted

Hi @Kasper Bakmann
specify you in server.xml options scheme/proxyName/proxyPort?

Exactly, in 

<Connector

of your server.xml (Apache tomcat under config dir)

Add

proxyName="jira.ourserver.com"  proxyPort="443" scheme="https" secure="true" 

@Viktor Okolot [Polontech] @Sash [ConfiForms] I have updated the description of the problem. We do not use a certificate on our JIRA server. Sorry for misinforming you .. And thanks for the kind replies.

0 vote
Steven Behnke Community Champion Feb 03, 2016

I am not certain of the strategy to accomplish this. Did you check the javascript file you're downloading inline? The script references HTTP and HTTPS and it looks like this – 

&lt;script type="text/javascript" src="https://jira.domain.com/s/79b3b8767086874764c0e633d4d3f1c2-T/en_USxto4uu/64019/67/1.4.25/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;collectorId=3a44c071"&gt;&lt;/script&gt;

 

Perhaps you just need to delete and recreate the issue-collector?

Hi @Steven Behnke 

Thanks for your quick reply.

We call the script via jQuery.ajax and the url looks like this:

https://jira.ourserver.com/s/7104f7a36d38bc662345373183b87543-T/da_DKbxlvll/6332/3/1.4.15/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=da-DK&collectorId=e2592a74

I can not see that should cause any problems - do you?

I have tried to recreate the issue collector and the script created by JIRA suggests using http://jira... not https:// .. hmm that seems strange, is there another base url we should set?

0 vote
Steven Behnke Community Champion Feb 03, 2016

I see. I read your Question more closely.

  • External traffic navigates to NGINX
  • NGINX terminates SSL and proxies JIRA

Viktor and Sash are both correct, you need to inform Tomcat that it is being proxied to an SSL connection on port 443 (https). Please do follow their directions about modifying the server.xml file.

Secondly, you could also try entering the reference to JIRA in your script so it looks like so – //jira.ourserver.com/. Notice the lack of 'http:' or 'https:'. Not sure if that will help your proxy issue though.

@Viktor Okolot [Polontech] + @Sash [ConfiForms] + @Steven Behnke .. Changing the Connector with proxyPort and proxyName did the trick as you adviced me to do. Thank you guys!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 28m ago in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

6 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you