Skip to content

Commit

Permalink
allow servername override for grpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyroyle committed Nov 22, 2018
1 parent 850872e commit 3dcc95f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion proxy/grpc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ func GetGRPCDirector(cfg *config.Config, tlscfg *tls.Config) func(ctx context.Co

if target.URL.Scheme == "grpcs" && tlscfg != nil {
opts = append(opts, grpc.WithTransportCredentials(
credentials.NewTLS(&tls.Config{ClientCAs: tlscfg.ClientCAs, InsecureSkipVerify: target.TLSSkipVerify})))
credentials.NewTLS(&tls.Config{
ClientCAs: tlscfg.ClientCAs,
InsecureSkipVerify: target.TLSSkipVerify,
ServerName: target.Opts["grpcservername"],
})))
}

newCtx := context.Background()
Expand Down

0 comments on commit 3dcc95f

Please sign in to comment.