Skip to content
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

fix: respect routers config in helia factory #652

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

2color
Copy link
Member

@2color 2color commented Oct 15, 2024

What's in this PR

  • take the passed routers config in createHelia into acount

This PR allows overriding the routers configuration when customising Helia. Useful when you want to exclusively fetch directly from peers without relying on recursive gateways.

Relevant context

In @helia/http we already do this:

routers: init.routers ?? [
delegatedHTTPRouting('https://delegated-ipfs.dev'),
httpGatewayRouting()
]

take the passed routers config in createHelia
Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@2color 2color merged commit 1b2934b into main Oct 16, 2024
19 checks passed
@2color 2color deleted the respect-routers branch October 16, 2024 10:07
@achingbrain achingbrain mentioned this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants