diff --git a/echo.go b/echo.go index b1a13319..ed13e8ae 100644 --- a/echo.go +++ b/echo.go @@ -546,8 +546,16 @@ func (e *Echo) StartTLS(address string, certFile, keyFile string) (err error) { return e.startTLS(address) } -// StartAutoTLS starts an HTTPS server using certificates automatically from https://letsencrypt.org. +// 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 diff --git a/middleware/logger.go b/middleware/logger.go index 6d3b0c5f..70278371 100644 --- a/middleware/logger.go +++ b/middleware/logger.go @@ -39,9 +39,9 @@ type ( // - latency_human (Human readable) // - bytes_in (Bytes received) // - bytes_out (Bytes sent) - // - header: - // - query: - // - form: + // - header: + // - query: + // - form: // // Example "${remote_ip} ${status}" // diff --git a/website/content/middleware/logger.md b/website/content/middleware/logger.md index 81ff003c..564d15b5 100644 --- a/website/content/middleware/logger.md +++ b/website/content/middleware/logger.md @@ -64,9 +64,9 @@ LoggerConfig struct { // - latency_human (Human readable) // - bytes_in (Bytes received) // - bytes_out (Bytes sent) - // - header: - // - query: - // - form: + // - header: + // - query: + // - form: // // Example "${remote_ip} ${status}" //