From 2ba7cd9ebdcdee744b3499e4dc389584c40f2375 Mon Sep 17 00:00:00 2001 From: softsimon Date: Sun, 18 Oct 2020 21:37:27 +0700 Subject: [PATCH] Proxy image requests. --- backend/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/index.ts b/backend/src/index.ts index 61da6c764..ffa8944da 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -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); }); } }