1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-28 08:38:39 +02:00

Removed port check from auto tls

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-01-24 08:48:00 -08:00
parent 7025f55cab
commit 4772b6e7f7

View File

@ -547,15 +547,7 @@ func (e *Echo) StartTLS(address string, certFile, keyFile string) (err error) {
}
// StartAutoTLS starts an HTTPS server using certificates automatically installed from https://letsencrypt.org.
// Port in address must be 443.
func (e *Echo) StartAutoTLS(address string) error {
_, port, err := net.SplitHostPort(address)
if err != nil {
return err
}
if port != "443" {
return errors.New("port for auto tls must be 443")
}
s := e.TLSServer
s.TLSConfig = new(tls.Config)
s.TLSConfig.GetCertificate = e.AutoTLSManager.GetCertificate