Use config.SERVER.HOST instead of this.mempoolHost for fallbackImg

This commit is contained in:
wiz 2022-08-30 14:30:32 +02:00
parent 25c5ca731d
commit 0f5e4d3a15
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -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) {