Support HTTP/2 in Let's Encrypt (#16371)

Modify the tlsConfig.NextProtos for Let's Encrypt and built-in HTTPS server in order to support HTTP/2.

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Stanley Huand6543 authored and GitHub committed 2021-07-13 18:17:46 +01:00
1 parent 57ee06fb94
commit 3dba75fb97
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -54,6 +54,7 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
}
tlsConfig := magic.TLSConfig()
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2")
if enableHTTPChallenge {
go func() {