Go-ipfs: Limit the size of files that IPFS will fetch from the P2P network.

Created on 24 May 2016  路  5Comments  路  Source: ipfs/go-ipfs

The IPFS api is nice and simple, but can cause problems for people wanting to use it as a gateway to serve images. A request for the wrong hash could cause ipfsd to start fetching a ton of data that is not actually desired.

The solutions I have at the moment are to do ipfs file ls first and then fetch, but that requires me to set up my own middleware when it would be nice to have the daemon fetch it for me.

help wanted kinenhancement topigateway

All 5 comments

Hrm... adding some more gateway config to set an upper limit on request sizes might be useful. Could also throw in other options at the same time like timeouts, rate limits, etc

And a completely readonly mode would be nice too.

Yeah, purely readonly would be nice.

And a completely readonly mode would be nice too.

There is now Gateway.NoFetch option in config

Here is the link to the docs for Gateway.NoFetch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whyrusleeping picture whyrusleeping  路  4Comments

JesseWeinstein picture JesseWeinstein  路  4Comments

lidel picture lidel  路  3Comments

emelleme picture emelleme  路  3Comments

daviddias picture daviddias  路  3Comments