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 13:43:44 -07:00
committed by GitHub
co-authored by Kamil Gabryjelski
parent 31ac3898ad
commit 09b92e7d08
100 changed files with 733 additions and 319 deletions
+4 -3
View File
@@ -19,6 +19,7 @@
import parseCookie from 'src/utils/parseCookie';
import rison from 'rison';
import { nanoid } from 'nanoid';
import { ensureAppRoot } from './pathUtils';
export default function handleResourceExport(
resource: string,
@@ -27,9 +28,9 @@ export default function handleResourceExport(
interval = 200,
): void {
const token = nanoid();
const url = `/api/v1/${resource}/export/?q=${rison.encode(
ids,
)}&token=${token}`;
const url = ensureAppRoot(
`/api/v1/${resource}/export/?q=${rison.encode(ids)}&token=${token}`,
);
// create new iframe for export
const iframe = document.createElement('iframe');