diff --git a/connect/connection_test.go b/connect/connection_test.go index 6e27fbbb64cfe4fd7e17fbf633e80b453bd8fb16..4ed53e0ec7a9c3c042577b2b192d0bb031472b17 100644 --- a/connect/connection_test.go +++ b/connect/connection_test.go @@ -151,7 +151,7 @@ func TestWebConnection_TLS(t *testing.T) { hostParams := GetDefaultHostParams() hostParams.ConnectionType = Web - h, err := newHost(hostId, addr, nil, hostParams) + h, err := newHost(hostId, addr, httpsCertBytes, hostParams) if err != nil { t.Fatal(err) } diff --git a/connect/host.go b/connect/host.go index 2081ea7dd67612f7ffeaa6d825ebf5382907dbfc..bee0fb0c0c62f6227617fc0d5a735cd10ec84401 100644 --- a/connect/host.go +++ b/connect/host.go @@ -118,12 +118,12 @@ func newHost(id *id.ID, address string, cert []byte, params HostParams) (host *H host.UpdateAddress(address) // Configure the transport credentials for GRPC hosts - if !host.IsWeb() { - err = host.setCredentials() - if err != nil { - return - } + //if !host.IsWeb() { + err = host.setCredentials() + if err != nil { + return } + //} // Connect immediately if configured to do so if params.DisableLazyConnection { diff --git a/connect/webConn.go b/connect/webConn.go index 066cae5cbd6e77bdb3ac3010fda80cebfbf0ad14..5ef033a07c8496a834b6da3295855dd13137cb93 100644 --- a/connect/webConn.go +++ b/connect/webConn.go @@ -79,9 +79,9 @@ func (wc *webConn) connectWebHelper() (err error) { // Configure TLS options var securityDial []grpcweb.DialOption - if wc.h.credentials != nil { - return errors.New("Web hosts should not have credentials specified") - } + //if wc.h.credentials != nil { + // return errors.New("Web hosts should not have credentials specified") + //} if !TestingOnlyDisableTLS { securityDial = []grpcweb.DialOption{grpcweb.WithSecure()}