From 3155cdba5bd86dbb5867a73271522786a575cb6b Mon Sep 17 00:00:00 2001 From: Tom Robinson <tlrobinson@gmail.com> Date: Mon, 28 Jan 2019 18:27:31 -0800 Subject: [PATCH] Fix embed downloads for 'non-root context'. Resolves #8848 --- frontend/src/metabase/lib/urls.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/metabase/lib/urls.js b/frontend/src/metabase/lib/urls.js index b99732ce9d7..2be64c0802f 100644 --- a/frontend/src/metabase/lib/urls.js +++ b/frontend/src/metabase/lib/urls.js @@ -118,11 +118,13 @@ export function publicDashboard(uuid) { } export function embedCard(token, type = null) { - return `/embed/question/${token}` + (type ? `.${type}` : ``); + const siteUrl = MetabaseSettings.get("site_url"); + return `${siteUrl}/embed/question/${token}` + (type ? `.${type}` : ``); } export function embedDashboard(token) { - return `/embed/dashboard/${token}`; + const siteUrl = MetabaseSettings.get("site_url"); + return `${siteUrl}/embed/dashboard/${token}`; } export function userCollection(userCollectionId) { -- GitLab