Skip to content

Commit e3717be

Browse files
awbraunsteinvishr
authored andcommitted
ensure that the TLS conifg contains the ALPN protocol (#1305)
1 parent 1f6cc36 commit e3717be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

echo.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import (
5757

5858
"github.com/labstack/gommon/color"
5959
"github.com/labstack/gommon/log"
60+
"golang.org/x/crypto/acme"
6061
"golang.org/x/crypto/acme/autocert"
6162
)
6263

@@ -641,6 +642,7 @@ func (e *Echo) StartAutoTLS(address string) error {
641642
s := e.TLSServer
642643
s.TLSConfig = new(tls.Config)
643644
s.TLSConfig.GetCertificate = e.AutoTLSManager.GetCertificate
645+
s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, acme.ALPNProto)
644646
return e.startTLS(address)
645647
}
646648

0 commit comments

Comments
 (0)