Skip to content

Commit ab203bf

Browse files
Nokivishr
authored andcommitted
Add directory to store the certificate and mention rate limits (#795)
The certificate must be cached to avoid problems with rate limits during testing.
1 parent eb7ebca commit ab203bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

recipe/auto-tls/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
func main() {
1111
e := echo.New()
1212
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<your_domain>")
13+
// Store the certificate to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits/)
14+
// e.AutoTLSManager.Cache = autocert.DirCache("<path to store key and certificate>")
1315
e.Use(middleware.Recover())
1416
e.Use(middleware.Logger())
1517
e.GET("/", func(c echo.Context) error {

0 commit comments

Comments
 (0)