loopd: fix ALPN issue with Python

There is an open issue for Python gRPC clients that is
currently being debugged grpc/grpc#23172

It can be mitigated server-side by specifying h2 in the metadata header.
This commit is contained in:
Oliver Gugger 2021-07-13 22:04:28 +02:00
parent df5924f25a
commit 4e45c2908a
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -319,6 +319,7 @@ func getTLSConfig(cfg *Config) (*tls.Config, *credentials.TransportCredentials,
}
tlsCfg := cert.TLSConfFromCert(certData)
tlsCfg.NextProtos = []string{"h2"}
restCreds, err := credentials.NewClientTLSFromFile(
cfg.TLSCertPath, "",
)