mirror of
https://github.com/labstack/echo.git
synced 2024-11-30 08:46:41 +02:00
Add directory to store the certificate and mention rate limits (#795)
The certificate must be cached to avoid problems with rate limits during testing.
This commit is contained in:
parent
eb7ebca112
commit
ab203bf19c
@ -10,6 +10,8 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
e := echo.New()
|
e := echo.New()
|
||||||
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<your_domain>")
|
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<your_domain>")
|
||||||
|
// Store the certificate to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits/)
|
||||||
|
// e.AutoTLSManager.Cache = autocert.DirCache("<path to store key and certificate>")
|
||||||
e.Use(middleware.Recover())
|
e.Use(middleware.Recover())
|
||||||
e.Use(middleware.Logger())
|
e.Use(middleware.Logger())
|
||||||
e.GET("/", func(c echo.Context) error {
|
e.GET("/", func(c echo.Context) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user