feat: Allow superset to be deployed under a prefixed URL (#30134)

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
Martyn Gigg
2025-04-09 21:43:44 +01:00
committed by GitHub
parent 31ac3898ad
commit 09b92e7d08
100 changed files with 733 additions and 319 deletions

View File

@@ -50,6 +50,7 @@ import {
LOG_ACTIONS_MOUNT_EXPLORER,
LOG_ACTIONS_CHANGE_EXPLORE_CONTROLS,
} from 'src/logger/LogUtils';
import { ensureAppRoot } from 'src/utils/pathUtils';
import { getUrlParam } from 'src/utils/urlUtils';
import cx from 'classnames';
import * as chartActions from 'src/components/Chart/chartAction';
@@ -215,7 +216,7 @@ const updateHistory = debounce(
stateModifier = 'pushState';
}
// avoid race condition in case user changes route before explore updates the url
if (window.location.pathname.startsWith('/explore')) {
if (window.location.pathname.startsWith(ensureAppRoot('/explore'))) {
const url = mountExploreUrl(
standalone ? URL_PARAMS.standalone.name : null,
{