1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

Updated deps and docs

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-01-21 10:20:59 -08:00
parent 069e80b9e0
commit e8910be0ac
4 changed files with 13 additions and 10 deletions

View File

@ -3,15 +3,17 @@ package main
import (
"net/http"
"golang.org/x/crypto/acme/autocert"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
)
func main() {
e := echo.New()
// 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.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<DOMAIN>")
// Cache certificates
e.AutoTLSManager.Cache = autocert.DirCache("/var/www/.cache")
e.Use(middleware.Recover())
e.Use(middleware.Logger())
e.GET("/", func(c echo.Context) error {

12
glide.lock generated
View File

@ -1,5 +1,5 @@
hash: 4a4f41416395516f7eefabd29ee5c7b065a411dec7446f6d6853d4cc28c4c644
updated: 2017-01-13T18:25:37.646516032-08:00
updated: 2017-01-21T10:20:13.866484425-08:00
imports:
- name: github.com/daaku/go.zipexe
version: a5fe2436ffcb3236e175e5149162b41cd28bd27d
@ -25,7 +25,7 @@ imports:
subpackages:
- proto
- name: github.com/gorilla/websocket
version: 17634340a83afe0cab595e40fbc63f6ffa1d8915
version: 2257eda00b2084c1351cd672aa5476daa9f5e463
- name: github.com/kardianos/osext
version: c2c54e542fb797ad986b31721e1baedf214ca413
- name: github.com/labstack/gommon
@ -40,18 +40,18 @@ imports:
- name: github.com/mattn/go-isatty
version: 30a891c33c7cde7b02a981314b4228ec99380cca
- name: github.com/tylerb/graceful
version: d37e108c89765a8e307f15b8fb2ecd10575da6bb
version: 0e9129e9c6d47da90dc0c188b26bd7bb1dab53cd
- name: github.com/valyala/bytebufferpool
version: e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7
- name: github.com/valyala/fasttemplate
version: d090d65668a286d9a180d43a19dfdc5dcad8fe88
- name: golang.org/x/crypto
version: 2f8be38b9a7533b8763d48273737ff6e90428a96
version: b8a2a83acfe6e6770b75de42d5ff4c67596675c0
subpackages:
- acme
- acme/autocert
- name: golang.org/x/net
version: c427ad74c6d7a814201695e9ffde0c5d400a7674
version: f2499483f923065a842d38eb4c7f1927e6fc6e6d
subpackages:
- context
- context/ctxhttp
@ -61,7 +61,7 @@ imports:
subpackages:
- unix
- name: google.golang.org/appengine
version: 9e2ad0873f358c54296ccdc5116b0652c98226d1
version: a2c54d2174c17540446e0ced57d9d459af61bc1c
subpackages:
- internal
- internal/app_identity

View File

@ -48,7 +48,7 @@ type (
// Optional. Default value DefaultLoggerConfig.Format.
Format string `json:"format"`
// Output is a writer where logs are written.
// Output is a writer where logs in JSON format are written.
// Optional. Default value os.Stdout.
Output io.Writer

View File

@ -15,6 +15,7 @@ message with TLS enabled on the website.
>
- For added security you should specify host policy in auto TLS manager
- Cache certificates to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits)
- To redirect HTTP traffic to HTTPS, you can use [redirect middleware](/middleware/redirect#https-redirect)
## Server