We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9952e88 commit e3c39efCopy full SHA for e3c39ef
service.go
@@ -124,15 +124,20 @@ func (s *Service) Serve() error {
124
panic(err)
125
}
126
127
+ tlsConfig := tls.Config{
128
+ NextProtos: []string{"h2"},
129
+ InsecureSkipVerify: s.enableInsecure,
130
+ }
131
+
132
cert, err := s.GetCertificate()
133
if err != nil {
- return err
134
+ if !s.enableInsecure {
135
+ return err
136
137
138
- tlsConfig := tls.Config{
- Certificates: []tls.Certificate{cert},
- NextProtos: []string{"h2"},
- InsecureSkipVerify: s.enableInsecure,
139
140
+ tlsConfig.Certificates = []tls.Certificate{cert}
141
142
143
tlsConfig.BuildNameToCertificate()
0 commit comments