Skip to content

Commit

Permalink
Fix for Issue metabase#8: METABASE_DASHBOARD_PATH env var not used
Browse files Browse the repository at this point in the history
  • Loading branch information
boehm-gipmbh committed Aug 2, 2024
1 parent 5c7a883 commit a80088c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const METABASE_SITE_URL =
const METABASE_JWT_SHARED_SECRET =
process.env.METABASE_JWT_SHARED_SECRET ||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";

const METABASE_DASHBOARD_PATH =
process.env.METABASE_DASHBOARD_PATH || "/dashboard/1";
const mods = "logo=false";

/**
Expand Down Expand Up @@ -130,8 +131,6 @@ app.get("/", function (req, res) {
});

app.get("/analytics", restrict, function (req, res) {
// replace ID "1" with the ID number in the path of your dashboard in Metabase.
const METABASE_DASHBOARD_PATH = "/dashboard/1";
var iframeUrl = `/sso/metabase?return_to=${METABASE_DASHBOARD_PATH}`;
res.send(
`<iframe src="${iframeUrl}" frameborder="0" width="1280" height="1000" allowtransparency></iframe>`
Expand Down

0 comments on commit a80088c

Please sign in to comment.