Analytics plugin attaches x-atlassian-mau-ignore header to all requests

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.13.3, 8.15.0
    • Component/s: Front-end API
    • None
    • 8.13
    • 2
    • Severity 3 - Minor
    • 0

      Issue Summary

      Atlassian analytics plugin attaches the header x-atlassian-mau-ignore: true to all requests generated with either XmlHttpRequest or with fetch. This creates problems if the custom code tries to send requests to external services, since extra headers in those requests might not be allowed.

      Steps to Reproduce

      Try to execute a remote request to any external server within Jira frontend.

      Expected Results

      Jira does not attach headers to requests not going to Jira server.

      Actual Results

      Jira attaches headers to any remote requests, regardless of the destination

      Workaround

      Remove the preprocessor hooks for XmlHttpRequest and fetch and restore the native functionality before the request to the third-party server by adding this line before the request:

      require('atlassian/analytics/user-activity-xhr-header').uninstall();

      If you need to restore preprocessor hooks for fetch and XHR after the remote request to an external service, you can do it like this:

      require('atlassian/analytics/user-activity-xhr-header').install();

            Assignee:
            Unassigned
            Reporter:
            Andrey Patyuchenko (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: