From 3c61a39864f087f1bb6305dbcd512bdd7ffb72fa Mon Sep 17 00:00:00 2001 From: Gusted Date: Sat, 12 Nov 2022 22:25:20 +0100 Subject: [PATCH] Enable http/2 support (#137) As per [the documentation](https://pkg.go.dev/net/http#Serve), it doesn't enable HTTP2 by-default, unless we enable it via the `NextProtos` option. Co-authored-by: Gusted Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/137 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Gusted Co-committed-by: Gusted --- server/certificates/certificates.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/certificates/certificates.go b/server/certificates/certificates.go index 42620b1..11cf0df 100644 --- a/server/certificates/certificates.go +++ b/server/certificates/certificates.go @@ -117,6 +117,7 @@ func TLSConfig(mainDomainSuffix string, }, PreferServerCipherSuites: true, NextProtos: []string{ + "h2", "http/1.1", tlsalpn01.ACMETLS1Protocol, },