Proxy image requests.

This commit is contained in:
softsimon 2020-10-18 21:37:27 +07:00
parent 70da8248cc
commit 2ba7cd9ebd
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -182,6 +182,9 @@ class Server {
this.app
.get(config.API_ENDPOINT + 'donations', (req, res) => {
req.pipe(request('https://mempool.space/api/v1/donations')).pipe(res);
})
.get(config.API_ENDPOINT + 'donations/images/:id', (req, res) => {
req.pipe(request('https://mempool.space/api/v1/donations/images/' + req.params.id)).pipe(res);
});
}
}