Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-68519

Add 'Access-Control-Allow-Origin: *' to '/atlassian-connect/all.js' to support CORS

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Ecosystem
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      It would be great to be able to load the `all.js` library using the Fetch API.

      That would allow us to mock the request on our test and CI environments with far more ease than the current way (at least for static add-ons).

      Since the library is already 100% public, I see no downsides on allowing CORS for this resource alone, but it would allow us to do the following.

      fetch(scriptUrl).then((response) => {
        let script = document.createElement('script')
        script.type = 'text/javascript'
        script.text = response.body
        document.getElementsByTagName('head')[0].appendChild(script)
      }) 
      

      Which allows for a very simple way of mocking the library request on test environments.
       

              Unassigned Unassigned
              fb0bbad09c55 42nd
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: