mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
Fix unfurler resource proxying
This commit is contained in:
parent
f36ee36576
commit
df8b6cd53c
1 changed files with 8 additions and 3 deletions
|
@ -259,9 +259,14 @@ class Server {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (this.secureHost) {
|
if (this.secureHost) {
|
||||||
https.get(config.SERVER.HOST + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => got.pipe(res));
|
https.get(config.SERVER.HOST + ':4200' + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
|
||||||
} else {
|
res.writeHead(got.statusCode, got.headers);
|
||||||
http.get(config.SERVER.HOST + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => got.pipe(res));
|
return got.pipe(res);
|
||||||
|
}); } else {
|
||||||
|
http.get(config.SERVER.HOST + ':4200' + rawPath, { headers: { 'user-agent': 'mempoolunfurl' }}, (got) => {
|
||||||
|
res.writeHead(got.statusCode, got.headers);
|
||||||
|
return got.pipe(res);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue