CORS in JIRA - Server could not be contacted error during Create Issue modal dialog
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.
Resolution
Specify Origin as allowed in CORS configuration of JIRA's web.xml
<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.