diff --git a/src/node/src/client.js b/src/node/src/client.js index a253c86025021e6e6a01e350f3995042ea6a0756..4e6314564283191ac22ae7d9d1bb2b2a8311ca2b 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -549,7 +549,7 @@ exports.makeClientConstructor = function(methods, serviceName) { options['grpc.primary_user_agent'] = 'grpc-node/' + version; this.channel = new grpc.Channel(address, credentials, options); // Extract the DNS name from the address string - address = address.replace(/(\w+:\/\/)?([^:]+)(:\d+)?\/?$/, '$2'); + address = address.replace(/(\w+:\/\/+)?([^:]+)(:\d+)?\/?$/, '$2'); this.server_address = address; this.auth_uri = 'https://' + this.server_address + '/' + serviceName; this.updateMetadata = updateMetadata;