Migration Guides

New version of GoodData.CN may invalidate parts of your GoodData.UI development environment. Follow these migration guides to update your development environment if necessary.

React Applications Created Before GoodData.CN 1.7

If you used create-gooddata-react-app before updating to GoodData.CN version 1.7 or newer, follow these steps.

Steps:

  1. Edit the src/setupProxy.js.

  2. Locate the following piece of code:

    headers: {
        host: domain.replace(/https:\/\//, ""),
        origin: null,
        // This is essential for Tiger backends. To ensure 401 flies when not authenticated and using proxy
        "X-Requested-With": "XMLHttpRequest",
    },
    onProxyReq: function (proxyReq, _req, _res) {
        proxyReq.setHeader("accept-encoding", "identity");
    },
    
  3. Replace it with:

    headers: {
        host: domain.replace(/^https:\/\//, ""),
        // This is essential for Tiger backends. To ensure 401 flies when not authenticated and using proxy
        "X-Requested-With": "XMLHttpRequest",
    },
    onProxyReq: function (proxyReq, _req, _res) {
        // changeOrigin: true does not work well for POST requests, so remove origin like this to be safe
        proxyReq.removeHeader("origin");
        proxyReq.setHeader("accept-encoding", "identity");
    },
    

Dashboard Plugins Initialized Before GoodData.CN 1.7

If you set up any Dashboard Plugins before updating to GoodData.CN version 1.7 or newer, follow these steps.

Steps:

  1. Edit the webpack.config.js.

  2. Locate the following piece of code:

    headers: {
        host: effectiveBackendUrl,
        origin: null,
    },
    onProxyReq(proxyReq) {
        proxyReq.setHeader("accept-encoding", "identity");
    },
    
  3. Replace it with:

    headers: {
        host: effectiveBackendUrl.replace(/^https?:\/\//, ""),
        // This is essential for Tiger backends. To ensure 401 flies when not authenticated and using proxy
        "X-Requested-With": "XMLHttpRequest",
    },
    onProxyReq(proxyReq) {
        // changeOrigin: true does not work well for POST requests, so remove origin like this to be safe
        proxyReq.removeHeader("origin");
        proxyReq.setHeader("accept-encoding", "identity");
    },