Enable ECDSA with AutoTLS #2621
Replies: 2 comments
-
https://echo.labstack.com/docs/cookbook/auto-tls#server Docs have example how to configure func main() {
e := echo.New()
e.Use(middleware.Recover())
e.Use(middleware.Logger())
e.GET("/", func(c echo.Context) error {
return c.HTML(http.StatusOK, `
<h1>Welcome to Echo!</h1>
<h3>TLS certificates automatically installed from Let's Encrypt :)</h3>
`)
})
autoTLSManager := autocert.Manager{
Prompt: autocert.AcceptTOS,
// Cache certificates to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits)
Cache: autocert.DirCache("/var/www/.cache"),
//HostPolicy: autocert.HostWhitelist("<DOMAIN>"),
}
s := http.Server{
Addr: ":443",
Handler: e, // set Echo as handler
TLSConfig: &tls.Config{
//Certificates: nil, // <-- s.ListenAndServeTLS will populate this field
GetCertificate: autoTLSManager.GetCertificate,
NextProtos: []string{acme.ALPNProto},
},
//ReadTimeout: 30 * time.Second, // use custom timeouts
}
if err := s.ListenAndServeTLS("", ""); err != http.ErrServerClosed {
e.Logger.Fatal(err)
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the quick response. I had seen this but was wondering if there's a working example for listing ciphers explicitly. Here's what I ended up with:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a cookbook recipe for using ECDSA CipherSuites with AutoTLS?
I'd like to improve TLS performance, that's why I'd like to default to ECDSA first. Does anyone have any other recommendations to improve TLS performance?
Beta Was this translation helpful? Give feedback.
All reactions