Skip to content

Commit

Permalink
end2end:secure version on TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajdab authored and p4u committed Sep 4, 2023
1 parent 79abb9c commit 0c4a1a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion httprouter/httprouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ func (r *HTTProuter) generateTLScert(host string, port int) (*http.Server, *auto
Cache: autocert.DirCache(r.TLSdirCert),
}
if r.TLSconfig == nil {
r.TLSconfig = &tls.Config{}
r.TLSconfig = &tls.Config{
MinVersion: tls.VersionTLS13, // secure version of TLS
MaxVersion: 0, // setting MaxVersion to 0 means that the highest version available in the package will be used
}
}
r.TLSconfig.GetCertificate = m.GetCertificate
serverConfig := &http.Server{
Expand Down

0 comments on commit 0c4a1a9

Please sign in to comment.