authclient: clone TLS configuration to prevent overriding NextProtos (#2594)

This commit is contained in:
Caleb Doxsey 2021-09-13 16:12:26 -06:00 committed by GitHub
parent e03460e124
commit 2f7a79d4f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,6 @@ type Option func(*config)
// WithTLSConfig returns an option to configure the tls config.
func WithTLSConfig(tlsConfig *tls.Config) Option {
return func(cfg *config) {
cfg.tlsConfig = tlsConfig
cfg.tlsConfig = tlsConfig.Clone()
}
}