From e3717be4beda1dcc2e5163c8b3fbdf0f2e365ace Mon Sep 17 00:00:00 2001 From: Andrew Braunstein Date: Tue, 12 Mar 2019 17:54:16 -0700 Subject: [PATCH] ensure that the TLS conifg contains the ALPN protocol (#1305) --- echo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/echo.go b/echo.go index bd4ac2f3..032bd002 100644 --- a/echo.go +++ b/echo.go @@ -57,6 +57,7 @@ import ( "github.com/labstack/gommon/color" "github.com/labstack/gommon/log" + "golang.org/x/crypto/acme" "golang.org/x/crypto/acme/autocert" ) @@ -641,6 +642,7 @@ func (e *Echo) StartAutoTLS(address string) error { s := e.TLSServer s.TLSConfig = new(tls.Config) s.TLSConfig.GetCertificate = e.AutoTLSManager.GetCertificate + s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, acme.ALPNProto) return e.startTLS(address) }