From 0f5e4d3a15a235ffdc940c2f93f3c5bf4ea537d4 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 30 Aug 2022 14:30:32 +0200 Subject: [PATCH] Use `config.SERVER.HOST` instead of `this.mempoolHost` for fallbackImg --- unfurler/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unfurler/src/index.ts b/unfurler/src/index.ts index 8192cb384..eab4723b7 100644 --- a/unfurler/src/index.ts +++ b/unfurler/src/index.ts @@ -140,9 +140,9 @@ class Server { if (!img) { // proxy fallback image from the frontend if (this.secureHost) { - https.get(this.mempoolHost + matchedRoute.fallbackImg, (got) => got.pipe(res)); + https.get(config.SERVER.HOST + matchedRoute.fallbackImg, (got) => got.pipe(res)); } else { - http.get(this.mempoolHost + matchedRoute.fallbackImg, (got) => got.pipe(res)); + http.get(config.SERVER.HOST + matchedRoute.fallbackImg, (got) => got.pipe(res)); } } else { res.contentType('image/png'); @@ -165,7 +165,7 @@ class Server { const { lang, path } = parseLanguageUrl(rawPath); const matchedRoute = matchRoute(this.network, path); - let ogImageUrl = this.mempoolHost + (matchedRoute.staticImg || matchedRoute.fallbackImg); + let ogImageUrl = config.SERVER.HOST + (matchedRoute.staticImg || matchedRoute.fallbackImg); let ogTitle = 'The Mempool Open Source Projectâ„¢'; if (matchedRoute.render) {