Optional
allowBy default we will not connect to any gateways over HTTP addresses, requring HTTPS connections instead. This is because it will cause "mixed-content" errors to appear in the console when running in secure browser contexts.
Pass true
here to connect to insecure Gateways as well, this may be
useful in testing environments.
false
Optional
allowBy default we will not connect to any HTTP Gateways providers over local or loopback addresses, this is because they are typically running on remote peers that have published private addresses by mistate.
Pass true
here to connect to local Gateways as well, this may be useful
in testing environments.
false
Optional
dnsIn order to parse DNSLink records, we need to resolve DNS queries. You can
pass a list of DNS resolvers that we will provide to the @helia/ipns
instance for you. You must construct them using the dnsJsonOverHttps
or
dnsOverHttps
functions exported from @helia/ipns/dns-resolvers
.
We use cloudflare and google's dnsJsonOverHttps resolvers by default.
[dnsJsonOverHttps('https://cloudflare-dns.com/dns-query'),dnsJsonOverHttps('https://dns.google/resolve')]
Optional
libp2pWe will instantiate a libp2p node for you, but if you want to override the libp2p configuration, you can pass it here.
WARNING: We use Object.assign to merge the default libp2p configuration from Helia with the one you pass here, which results in a shallow merge. If you need a deep merge, you should do it yourself before passing the configuration here.
Optional
routers
Instead of passing a Helia instance, you can pass a list of gateways and routers, and a HeliaHTTP instance will be created for you.