Proxy image requests.

This commit is contained in:
softsimon 2020-10-18 21:37:27 +07:00
parent 7f3d871063
commit e35f3d7a3d

View File

@ -182,6 +182,9 @@ class Server {
this.app this.app
.get(config.API_ENDPOINT + 'donations', (req, res) => { .get(config.API_ENDPOINT + 'donations', (req, res) => {
req.pipe(request('https://mempool.space/api/v1/donations')).pipe(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);
}); });
} }
} }