Error cross domain

Hello everyone,
I am developing a plugin for Jira cloud, and in use the api of jira and apis of other programs. I have been developing the plugin with chrome security disabled. The problem arises when I try to use the plugin in normal Chrome, as it gives me a cross domain error. I have tried using the jsonp and it does not work, I have also tried to use the “allow control access allow” header but it does not work either. The strange thing is that I do not work any calls to the apis, nor even those of the apis of Jira
Errors:
Failed to load https://pluginjiraharvest.atlassian.net/secure/AjaxIssueEditAction!default.jspa?decorator=none&issueId=10006: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://hostxxxx’ is therefore not allowed access. The response had HTTP status code 401.
Any solutions?

No solution yet…
Vote for it :slight_smile:
https://jira.atlassian.com/browse/JRACLOUD-30371

but then how come there are plugins in the marketplace that if they make calls to external apis and if they work in the normal chrome ?, an example of this is the Harvest plugin (It is a very similar to the one I have developed). There must be some solution for this if those plugins do the same

Hi @javier.sainzmaza,

We developed the Atlassian Connect JavaScript API explicitly for this purpose. Atlassian Connect add-ons can make client-side requests using cross-domain messaging provided by the API. Learn more here: https://developer.atlassian.com/cloud/jira/platform/about-the-javascript-api/