Skip to content

Is AutoTLS working for anyone after the recent LetsEncrypt revokation? #2087

Answered by aldas
zacpod asked this question in Q&A
Discussion options

You must be logged in to vote

Probably belongs to https://github.com/golang/crypto as Echo uses it for autocert stuff

This is example without Echo.StartTLS and allows you complete control over http.Server and cert manager

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:…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zacpod
Comment options

@eranchetz
Comment options

Answer selected by zacpod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants