From fcb8c39b1d26c1ba4a407522c9ca009dcc9ddcde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cintia=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Thu, 31 Oct 2024 10:56:38 +0100 Subject: [PATCH] Add missing base-path to embed url when required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cintia Sánchez García --- ui/webapp/src/layout/navigation/EmbedModal.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/webapp/src/layout/navigation/EmbedModal.tsx b/ui/webapp/src/layout/navigation/EmbedModal.tsx index 051fb46c..ba132a7f 100644 --- a/ui/webapp/src/layout/navigation/EmbedModal.tsx +++ b/ui/webapp/src/layout/navigation/EmbedModal.tsx @@ -6,6 +6,7 @@ import { batch, createEffect, createMemo, createSignal, For, on, onMount, Show } import { Alignment, + BASE_PATH_PARAM, DEFAULT_DISPLAY_CATEGORY_HEADER, DEFAULT_DISPLAY_CATEGORY_IN_SUBCATEGORY, DEFAULT_DISPLAY_HEADER, @@ -136,6 +137,11 @@ const EmbedModal = () => { const getIFrameUrl = () => { const embedUrl = new URL(`${embedOrigin()}/embed.html`); const embedParams = new URLSearchParams(); + + if (!isUndefined(BASE_PATH)) { + embedParams.append(BASE_PATH_PARAM, BASE_PATH); + } + embedParams.append(KEY_PARAM, key() || categoriesList()[0].normalized_name); embedParams.append(DISPLAY_HEADER_PARAM, displayHeader() ? 'true' : 'false'); embedParams.append(DISPLAY_HEADER_CATEGORY_PARAM, displayCategoryTitle() ? 'true' : 'false');