ipfs / go-ipfs-http-client

[archived] Legacy Kubo RPC client, use kubo/client/rpc instead.
MIT License
109 stars 41 forks source link

fix: use https URI when multiaddress specifies tls #177

Closed rossjones closed 1 year ago

rossjones commented 1 year ago

Currently any clients created through NewApiWithClient will make a HTTP request to the api, even if the multiaddress specifies TLS or (the deprecated multiaddr option) https.

This commit addresses this by having NewApiWithClient iterate the available protocols for the multiaddress, specifying the URL proto as https if it finds TLS or HTTPS is specified. The default continues to be http for those multiaddresses that do not specify these options.

Should resolve #176

welcome[bot] commented 1 year ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!