Skip to content

Internal and external IPFS gateway URL support #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wesbiggs opened this issue May 2, 2025 · 0 comments
Open

Internal and external IPFS gateway URL support #824

wesbiggs opened this issue May 2, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@wesbiggs
Copy link
Contributor

wesbiggs commented May 2, 2025

IpfsService was recently changed (#821 ) to perform a HEAD request on the IPFS gateway's public URL. Because of this, the (external) ipfsGatewayUrl needs to be reachable by the content-publishing service, which theoretically might not always be the case depending on routing setup.

Similarly, content-watcher needs some attention as well. Currently it uses the IPFS node API to fetch content by CID; however, that requires having access to a private node--technically, running content-watcher should only require a public gateway. In which case, we would probably change content-watcher to also use ipfsGatewayUrl, which would mean it would need to be resolvable by content-watcher as well, so the same question applies.

TL;DR:

  • content-publisher needs BOTH (or the same) a publicly-resolvable IPFS Gateway URL AND an internally-resolvable IPFS Gateway URL
  • content-watcher needs ONLY an internally-resolvable IPFS Gateway URL

Suggested approach:

  • Add optional IPFS config parameter internalGatewayUrl, templated same as gatewayUrl. If configured, this will be used for internal service access to the IPFS HTTP gateway.
  • Change content-watcher to use gateway interface rather than RPC API following this approach.
  • Change IpfsService to use internal gateway if configured for existsInLocalGateway()
@wesbiggs wesbiggs added the enhancement New feature or request label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant