1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Added workaround for default enabled HTTP2 configuration

This commit is contained in:
Merten van Gerven 2015-10-12 14:23:32 +02:00
parent ba4a01049d
commit 748bd91dbe

View File

@ -14,5 +14,14 @@ func main() {
return c.String(http.StatusOK, "Six sick bricks tick") return c.String(http.StatusOK, "Six sick bricks tick")
}) })
gracehttp.Serve(e.Server(":1323")) // Get the http.Server
s := e.Server(":1323")
// HTTP2 is currently enabled by default in echo.New(). To override TLS handshake errors
// you will need to override the TLSConfig for the server so it does not attempt to valudate
// the connection using TLS as required by HTTP2
s.TLSConfig = nil
// Serve it like a boss
gracehttp.Serve(s)
} }