diff options
author | Stanley Hu <stanthetiger@yahoo.com> | 2021-07-14 01:17:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 18:17:46 +0100 |
commit | 3dba75fb9700548f27dbe2f61dd148f392ae13a0 (patch) | |
tree | 73925f4f04ac29262c8d7ee0bc4a890525ae3998 /modules/graceful | |
parent | 57ee06fb949dcb2aeae9a17843118d76003d3b20 (diff) | |
download | gitea-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 'modules/graceful')
-rw-r--r-- | modules/graceful/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/graceful/server.go b/modules/graceful/server.go index 704aa8a2b7..6b7d4a1a97 100644 --- a/modules/graceful/server.go +++ b/modules/graceful/server.go @@ -106,7 +106,7 @@ func (srv *Server) ListenAndServe(serve ServeFunction) error { func (srv *Server) ListenAndServeTLS(certFile, keyFile string, serve ServeFunction) error { config := &tls.Config{} if config.NextProtos == nil { - config.NextProtos = []string{"http/1.1"} + config.NextProtos = []string{"h2", "http/1.1"} } config.Certificates = make([]tls.Certificate, 1) |