Merge pull request #4397 from filecoin-project/revert-4391-feat/https-api
Revert "Add support for /https, /http, /wss API multiaddresses."
This commit is contained in:
commit
01de4cb2ec
@ -44,22 +44,7 @@ func (a APIInfo) DialArgs() (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
protocol := "ws"
|
return "ws://" + addr + "/rpc/v0", nil
|
||||||
|
|
||||||
// If the user specifies the multiaddress as
|
|
||||||
// /something/tcp/1234/http or/something/tcp/1234/https
|
|
||||||
// or /something/tcp/1234/wss then honor that.
|
|
||||||
for _, p := range []int{
|
|
||||||
multiaddr.P_HTTP,
|
|
||||||
multiaddr.P_HTTPS,
|
|
||||||
multiaddr.P_WSS,
|
|
||||||
} {
|
|
||||||
if _, err := ma.ValueForProtocol(p); err == nil {
|
|
||||||
protocol = multiaddr.ProtocolWithCode(p).Name
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return protocol + "://" + addr + "/rpc/v0", nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = url.Parse(a.Addr)
|
_, err = url.Parse(a.Addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user