hyphacoop / api.distributed.press

https://distributed.press
GNU Affero General Public License v3.0
77 stars 8 forks source link

Don't run public gateway #28

Closed makew0rld closed 1 year ago

makew0rld commented 2 years ago

Set Gateway.NoFetch to true.

When set to true, the gateway will only serve content already in the local repo and will not fetch files from the network.

This prevents the IPFS gateway from being abused as a public general gateway.

fauno commented 2 years ago

We're thinking of doing this in Sutty too, but it seems you need to add all domain names to a JSON array and reload the config? I haven't checked if it can be done through IPFS API

makew0rld commented 2 years ago

My understanding is that you don't need to set any domain names for this to work, it's an entirely separate config setting. You just need to set Gateway.NoFetch and it'll work.

jackyzha0 commented 1 year ago

Closing (applies to v0)