diff --git a/unfurler/src/index.ts b/unfurler/src/index.ts index 1ce5a0a72..828d50e6b 100644 --- a/unfurler/src/index.ts +++ b/unfurler/src/index.ts @@ -396,7 +396,7 @@ class Server { try { const data = await matchedRoute.sip.getData(matchedRoute.params); logger.info(`sip data fetched for "${req.url}" in ${Date.now() - start}ms`); - res.render(matchedRoute.sip.template, { canonical, ogImageUrl, ogTitle, matchedRoute, data }); + res.render(matchedRoute.sip.template, { canonicalHost: this.canonicalHost, canonical, ogImageUrl, ogTitle, matchedRoute, data }); logger.info(`sip returned "${req.url}" in ${Date.now() - start}ms`); } catch (e) { logger.err(`failed to sip ${req.url}: ` + (e instanceof Error ? e.message : `${e}`)); diff --git a/unfurler/src/routes.ts b/unfurler/src/routes.ts index 00833315d..506116074 100644 --- a/unfurler/src/routes.ts +++ b/unfurler/src/routes.ts @@ -50,6 +50,7 @@ const routes = { return { block, transactions, + canonicalPath: `/block/${blockId}`, }; } } diff --git a/unfurler/views/head.ejs b/unfurler/views/head.ejs index 8cbdc8a13..bc36e54f1 100644 --- a/unfurler/views/head.ejs +++ b/unfurler/views/head.ejs @@ -1,7 +1,11 @@