aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorStanley Hu <stanthetiger@yahoo.com>2021-07-14 01:17:46 +0800
committerGitHub <noreply@github.com>2021-07-13 18:17:46 +0100
commit3dba75fb9700548f27dbe2f61dd148f392ae13a0 (patch)
tree73925f4f04ac29262c8d7ee0bc4a890525ae3998 /cmd
parent57ee06fb949dcb2aeae9a17843118d76003d3b20 (diff)
downloadgitea-3dba75fb9700548f27dbe2f61dd148f392ae13a0.tar.gz
gitea-3dba75fb9700548f27dbe2f61dd148f392ae13a0.zip
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web_letsencrypt.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/web_letsencrypt.go b/cmd/web_letsencrypt.go
index d50d803e1d..a683999790 100644
--- a/cmd/web_letsencrypt.go
+++ b/cmd/web_letsencrypt.go
@@ -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() {