Skip to content

Commit 8bb8a62

Browse files
yvtlidel
authored andcommitted
fix: support HTTPS API endpoints (#654)
This commit fixes the issue that a protocol name (http or https) is not passed to `ipfs-http-client` as intended. Closes #652
1 parent 5ea62ee commit 8bb8a62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

add-on/src/lib/ipfs-client/external.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ exports.init = async function (opts) {
77
console.log('[ipfs-companion] External ipfs init', opts.apiURLString)
88

99
const url = opts.apiURL
10-
const api = IpfsApi({ host: url.hostname, port: url.port, procotol: url.protocol })
10+
const protocol = url.protocol.substr(0, url.protocol.length - 1) // http: -> http
11+
const api = IpfsApi({ host: url.hostname, port: url.port, protocol })
1112
return api
1213
}
1314

0 commit comments

Comments
 (0)