mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
ensure that the TLS conifg contains the ALPN protocol (#1305)
This commit is contained in:
parent
1f6cc362cc
commit
e3717be4be
2
echo.go
2
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user