An IPFS implementation in Go
Go to file
Ross Jones 7d8262307c fix: use https URI when multiaddress specifies tls (#177)
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

This commit was moved from ipfs/go-ipfs-http-client@7e1de1f7cc
2023-05-15 18:18:51 +02:00
client/httpapi fix: use https URI when multiaddress specifies tls (#177) 2023-05-15 18:18:51 +02:00