Use config.SERVER.HOST
instead of this.mempoolHost
for fallbackImg
This commit is contained in:
parent
25c5ca731d
commit
0f5e4d3a15
@ -140,9 +140,9 @@ class Server {
|
|||||||
if (!img) {
|
if (!img) {
|
||||||
// proxy fallback image from the frontend
|
// proxy fallback image from the frontend
|
||||||
if (this.secureHost) {
|
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 {
|
} else {
|
||||||
http.get(this.mempoolHost + matchedRoute.fallbackImg, (got) => got.pipe(res));
|
http.get(config.SERVER.HOST + matchedRoute.fallbackImg, (got) => got.pipe(res));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res.contentType('image/png');
|
res.contentType('image/png');
|
||||||
@ -165,7 +165,7 @@ class Server {
|
|||||||
|
|
||||||
const { lang, path } = parseLanguageUrl(rawPath);
|
const { lang, path } = parseLanguageUrl(rawPath);
|
||||||
const matchedRoute = matchRoute(this.network, path);
|
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™';
|
let ogTitle = 'The Mempool Open Source Project™';
|
||||||
|
|
||||||
if (matchedRoute.render) {
|
if (matchedRoute.render) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user