-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start an HTTP/2 server with gin without providing ssl certificates #1116
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. |
@thinkerou the above auto-tls link should be updated to https://github.com/gin-gonic/examples/tree/master/auto-tls Also what do you think about adding HTTP2 without TLS (H2C) support like the following https://github.com/thrawn01/h2c-golang-example/blob/master/cmd/server/main.go Associated blog - https://www.mailgun.com/blog/http-2-cleartext-h2c-client-example-go/ |
I hope this PR gets merged to support this |
#1398 already merged. |
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 .
The text was updated successfully, but these errors were encountered: