Skip to content

Commit

Permalink
Removing some headers from /ipfs response
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Oct 15, 2023
1 parent 224537e commit 2fce7bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() });
Expand Down

0 comments on commit 2fce7bf

Please sign in to comment.