Gin: Start an HTTP/2 server with gin without providing ssl certificates

Created on 22 Sep 2017  ·  4Comments  ·  Source: gin-gonic/gin

var port = “8080”
func main() {
mainRouter := gin.Default()
mainRouter.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
mainRouter.RunTLS(":"+port, "server.pem", "server.key")
}

Is it necessary to provide server.pem and server.key to start a tls server , Cant this ssl check can be done at Load Balancer level which resides on the top of gin server ?

I want my application to be independent of the ssl check , is this possible to start server without providing certificate like mainRouter.RunTLS(":"+port)

Purpose - i need to serve http2 request with gin .

question

All 4 comments

Maybe the example can help you.

That did`nt help as it uses TLS for HTTP2 instead is there a way we use TCP implementation for HTTP2 in gin?

We need this too. We're doing ssl termination at the ALB level in AWS.

Was this page helpful?
0 / 5 - 0 ratings