diff --git a/adapter/src/components/ServerVersionProvider.js b/adapter/src/components/ServerVersionProvider.js index 6dfc87cc..c2cc9d83 100644 --- a/adapter/src/components/ServerVersionProvider.js +++ b/adapter/src/components/ServerVersionProvider.js @@ -3,6 +3,7 @@ import { getBaseUrlByAppName, setBaseUrlByAppName } from '@dhis2/pwa' import PropTypes from 'prop-types' import React, { useEffect, useState } from 'react' import { get } from '../utils/api.js' +import { getBaseUrl } from '../utils/getBaseUrl.js' import { parseDHIS2ServerVersion, parseVersion } from '../utils/parseVersion.js' import { LoadingMask } from './LoadingMask.js' import { LoginModal } from './LoginModal.js' @@ -150,13 +151,15 @@ export const ServerVersionProvider = ({ const serverVersion = parseDHIS2ServerVersion(systemInfo.version) const realApiVersion = serverVersion.minor + // ultimately, use an absolute URL based on hosted location + const finalBaseUrl = getBaseUrl(baseUrl) return (