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 .
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.
@BastianM3 https://github.com/gin-gonic/gin/tree/master/examples/auto-tls can help you?