CORS in JIRA - Server could not be contacted error during Create Issue modal dialog
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Symptoms
In Google Chrome or Safari browser, when using the 'Create Issue' link in JIRA's navigation header, the modal dialog will never load. Instead the dialog fails to load, with spinning wheel finally returning a Server could not be contacted error message.

Diagnosis
JIRA(Tomcat) is configured with CORS
Only affects Google Chrome or Safari browsers
Works as expected in Firefox browser
Cause
Chrome and Safari include an Origin
header on same-origin POST/PUT/DELETE requests (same-origin GET requests will not have an Origin header). Firefox doesn't include an Origin
header on same-origin requests.
Solution
Resolution
Specify Origin as allowed in CORS configuration of JIRA's web.xml
1 2 3 4
<init-param> <param-name>cors.supportedHeaders</param-name> <param-value>Origin</param-value> </init-param>
ℹ️ See either this Answers post for more details on JIRA with CORS, or alternatively this page for details on browser handling of origin headers.
Was this helpful?