From 2fce7bf7cf66f2a994a11a88f98c82852ffad396 Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Sun, 15 Oct 2023 19:33:41 -0400 Subject: [PATCH] Removing some headers from /ipfs response --- server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.js b/server.js index d1eb2b8..91715a7 100644 --- a/server.js +++ b/server.js @@ -163,6 +163,13 @@ app.get('/ipfs/*', async (req, res) => { res.set('Content-Type', 'image/gif'); } // ...add more conditions for other file types as needed + res.removeHeader('server'); + res.removeHeader('trailer'); + res.removeHeader('vary'); + + // console.log("Axios response headers:", response.headers); + // console.log("Express response headers:", res.getHeaders()); + response.data.pipe(res); } catch (error) { res.status(500).send({ error: error.toString() });